diff --git a/.github/workflows/render_nanomaps.yml b/.github/workflows/render_nanomaps.yml index bb90815b7f0..403bc8dc77d 100644 --- a/.github/workflows/render_nanomaps.yml +++ b/.github/workflows/render_nanomaps.yml @@ -35,11 +35,6 @@ jobs: git commit -m "NanoMap Auto-Update (`date`)" -a || true git push -f -u origin nanomap-render - - name: 'Push Maps' - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - - name: Create Pull Request uses: repo-sync/pull-request@v2 with: diff --git a/code/__DEFINES/contracts.dm b/code/__DEFINES/contracts.dm deleted file mode 100644 index 26351cfbac2..00000000000 --- a/code/__DEFINES/contracts.dm +++ /dev/null @@ -1,58 +0,0 @@ -#define CONTRACT_POWER "Power" -#define CONTRACT_WEALTH "Wealth" -#define CONTRACT_PRESTIGE "Prestige" -#define CONTRACT_MAGIC "Magic" -#define CONTRACT_REVIVE "Revive" -#define CONTRACT_KNOWLEDGE "Knowledge" -#define CONTRACT_UNWILLING "Unwilling" -#define CONTRACT_FRIENDSHIP "Friendship" -// FIXME: Implement these -#define CONTRACT_ETALENT "Engineering Talent" -#define CONTRACT_CTALENT "Chemistry Talent" -#define CONTRACT_RETURNDEAD "Return Dead" -#define CONTRACT_AUGMENT "Cybernetic Augmentations" -#define CONTRACT_CANDY "Endless Candy" -#define CONTRACT_ECHANCE "An Extra Chance" -#define CONTRACT_ATECH "Advanced Technology" -#define CONTRACT_DEVILSMACHINE "Devil's Machinery" -#define CONTRACT_YOUTH "Eternal Youth" -#define CONTRACT_FOOD "Food" -#define CONTRACT_SPACE "Space Gear" -#define CONTRACT_CALAMITY "Calamity" - -#define BANE_SALT "salt" -#define BANE_LIGHT "light" -#define BANE_IRON "iron" -#define BANE_WHITECLOTHES "whiteclothes" -#define BANE_SILVER "silver" -#define BANE_HARVEST "harvest" -#define BANE_TOOLBOX "toolbox" - -#define OBLIGATION_FOOD "food" -#define OBLIGATION_FIDDLE "fiddle" -#define OBLIGATION_DANCEOFF "danceoff" -#define OBLIGATION_GREET "greet" -#define OBLIGATION_PRESENCEKNOWN "presenceknown" -#define OBLIGATION_SAYNAME "sayname" -#define OBLIGATION_ANNOUNCEKILL "announcekill" -#define OBLIGATION_ANSWERTONAME "answername" - -#define BAN_HURTWOMAN "hurtwoman" -#define BAN_HURTMAN "hurtman" -#define BAN_CHAPEL "chapel" -#define BAN_HURTPRIEST "hurtpriest" -#define BAN_AVOIDWATER "avoidwater" -#define BAN_STRIKEUNCONCIOUS "strikeunconcious" -#define BAN_HURTLIZARD "hurtlizard" -#define BAN_HURTANIMAL "hurtanimal" - -#define BANISH_WATER "water" -#define BANISH_COFFIN "coffin" -#define BANISH_FORMALDYHIDE "embalm" -#define BANISH_RUNES "runes" -#define BANISH_CANDLES "candles" -#define BANISH_DESTRUCTION "destruction" -#define BANISH_FUNERAL_GARB "funeral" - -#define LORE 1 -#define LAW 2 diff --git a/code/__DEFINES/hud.dm b/code/__DEFINES/hud.dm index f4d5b9f5b1c..14e5fc674ce 100644 --- a/code/__DEFINES/hud.dm +++ b/code/__DEFINES/hud.dm @@ -53,9 +53,8 @@ #define ANTAG_HUD_VAMPIRE 16 #define ANTAG_HUD_ABDUCTOR 17 #define DATA_HUD_ABDUCTOR 18 -#define ANTAG_HUD_DEVIL 19 -#define ANTAG_HUD_EVENTMISC 20 -#define ANTAG_HUD_BLOB 21 +#define ANTAG_HUD_EVENTMISC 19 +#define ANTAG_HUD_BLOB 20 // Notification action types #define NOTIFY_JUMP "jump" diff --git a/code/__DEFINES/preferences.dm b/code/__DEFINES/preferences.dm index 878dab544d9..73e7b2227dc 100644 --- a/code/__DEFINES/preferences.dm +++ b/code/__DEFINES/preferences.dm @@ -54,8 +54,9 @@ #define PREFTOGGLE_2_EMOTE_BUBBLE 256 // Yes I know this being an "enable to disable" is misleading, but it avoids having to tweak all existing pref entries #define PREFTOGGLE_2_REVERB_DISABLE 512 +#define PREFTOGGLE_2_FORCE_WHITE_RUNECHAT 1024 -#define TOGGLES_2_TOTAL 1023 // If you add or remove a preference toggle above, make sure you update this define with the total value of the toggles combined. +#define TOGGLES_2_TOTAL 2047 // If you add or remove a preference toggle above, make sure you update this define with the total value of the toggles combined. #define TOGGLES_2_DEFAULT (PREFTOGGLE_2_FANCYUI|PREFTOGGLE_2_ITEMATTACK|PREFTOGGLE_2_WINDOWFLASHING|PREFTOGGLE_2_RUNECHAT|PREFTOGGLE_2_DEATHMESSAGE|PREFTOGGLE_2_EMOTE_BUBBLE) diff --git a/code/__DEFINES/role_preferences.dm b/code/__DEFINES/role_preferences.dm index 8021fa4452d..85c15c1971c 100644 --- a/code/__DEFINES/role_preferences.dm +++ b/code/__DEFINES/role_preferences.dm @@ -26,7 +26,6 @@ #define ROLE_REVENANT "revenant" #define ROLE_HOG_GOD "hand of god: god" // We're prolly gonna port this one day or another #define ROLE_HOG_CULTIST "hand of god: cultist" -#define ROLE_DEVIL "devil" #define ROLE_RAIDER "vox raider" #define ROLE_TRADER "trader" #define ROLE_VAMPIRE "vampire" @@ -54,7 +53,6 @@ GLOBAL_LIST_INIT(special_roles, list( ROLE_CHANGELING = /datum/game_mode/changeling, // Changeling ROLE_BORER, // Cortical borer ROLE_CULTIST = /datum/game_mode/cult, // Cultist - ROLE_DEVIL = /datum/game_mode/devil/devil_agents, // Devil ROLE_GSPIDER, // Giant spider ROLE_GUARDIAN, // Guardian ROLE_MORPH, // Morph diff --git a/code/__HELPERS/AnimationLibrary.dm b/code/__HELPERS/AnimationLibrary.dm index 7bbeb0a8c80..738783ed826 100644 --- a/code/__HELPERS/AnimationLibrary.dm +++ b/code/__HELPERS/AnimationLibrary.dm @@ -4,26 +4,26 @@ * The spin from being thrown will interrupt most of these animations as will grabs, account for that accordingly. */ -/proc/animate_fade_grayscale(var/atom/A, var/time = 5) +/proc/animate_fade_grayscale(atom/A, time = 5) if(!istype(A) && !istype(A, /client)) return A.color = null animate(A, color = MATRIX_GREYSCALE, time = time, easing = SINE_EASING) -/proc/animate_melt_pixel(var/atom/A) +/proc/animate_melt_pixel(atom/A) if(!istype(A)) return animate(A, pixel_y = 0, time = 50 - A.pixel_y, alpha = 175, easing = BOUNCE_EASING) animate(alpha = 0, easing = LINEAR_EASING) -/proc/animate_explode_pixel(var/atom/A) +/proc/animate_explode_pixel(atom/A) if(!istype(A)) return var/floatdegrees = rand(5, 20) var/side = pick(-1, 1) animate(A, pixel_x = rand(-64, 64), pixel_y = rand(-64, 64), transform = matrix(floatdegrees * (side == 1 ? 1:-1), MATRIX_ROTATE), time = 10, alpha = 0, easing = SINE_EASING) -/proc/animate_float(var/atom/A, var/loopnum = -1, floatspeed = 20, random_side = 1) +/proc/animate_float(atom/A, loopnum = -1, floatspeed = 20, random_side = 1) if(!istype(A)) return var/floatdegrees = rand(5, 20) @@ -35,7 +35,7 @@ animate(A, pixel_y = 32, transform = matrix(floatdegrees * (side == 1 ? 1:-1), MATRIX_ROTATE), time = floatspeed, loop = loopnum, easing = SINE_EASING) animate(pixel_y = 0, transform = matrix(floatdegrees * (side == 1 ? -1:1), MATRIX_ROTATE), time = floatspeed, loop = loopnum, easing = SINE_EASING) -/proc/animate_levitate(var/atom/A, var/loopnum = -1, floatspeed = 20, random_side = 1) +/proc/animate_levitate(atom/A, loopnum = -1, floatspeed = 20, random_side = 1) if(!istype(A)) return var/floatdegrees = rand(5, 20) @@ -47,7 +47,7 @@ animate(A, pixel_y = 8, transform = matrix(floatdegrees * (side == 1 ? 1:-1), MATRIX_ROTATE), time = floatspeed, loop = loopnum, easing = SINE_EASING) animate(pixel_y = 0, transform = null, time = floatspeed, loop = loopnum, easing = SINE_EASING) -/proc/animate_ghostly_presence(var/atom/A, var/loopnum = -1, floatspeed = 20, random_side = 1) +/proc/animate_ghostly_presence(atom/A, loopnum = -1, floatspeed = 20, random_side = 1) if(!istype(A)) return var/floatdegrees = rand(5, 20) @@ -59,7 +59,7 @@ animate(A, pixel_y = 8, transform = matrix(floatdegrees * (side == 1 ? 1:-1), MATRIX_ROTATE), time = floatspeed, loop = loopnum, easing = SINE_EASING) animate(pixel_y = 0, transform = matrix(floatdegrees * (side == 1 ? -1:1), MATRIX_ROTATE), time = floatspeed, loop = loopnum, easing = SINE_EASING) -/proc/animate_fading_leap_up(var/atom/A) +/proc/animate_fading_leap_up(atom/A) if(!istype(A)) return var/matrix/M = matrix() @@ -71,7 +71,7 @@ sleep(1) A.alpha = 0 -/proc/animate_fading_leap_down(var/atom/A) +/proc/animate_fading_leap_down(atom/A) if(!istype(A)) return var/matrix/M = matrix() @@ -84,7 +84,7 @@ sleep(1) animate(A, transform = M, pixel_z = 0, alpha = 255, time = 1, loop = 1, easing = LINEAR_EASING) -/proc/animate_shake(var/atom/A, var/amount = 5, var/x_severity = 2, var/y_severity = 2) +/proc/animate_shake(atom/A, amount = 5, x_severity = 2, y_severity = 2) // Wiggles the sprite around on its tile then returns it to normal if(!istype(A)) return @@ -101,7 +101,7 @@ spawn(amount) animate(A, transform = null, pixel_y = 0, pixel_x = 0,time = 1,loop = 1, easing = LINEAR_EASING) -/proc/animate_teleport(var/atom/A) +/proc/animate_teleport(atom/A) if(!istype(A)) return var/matrix/M = matrix(1, 3, MATRIX_SCALE) @@ -110,7 +110,7 @@ animate(transform = M, time = 5, color = "#1111ff", alpha = 0, easing = CIRCULAR_EASING) animate(transform = null, time = 5, color = "#ffffff", alpha = 255, pixel_y = 0, easing = ELASTIC_EASING) -/proc/animate_teleport_wiz(var/atom/A) +/proc/animate_teleport_wiz(atom/A) if(!istype(A)) return var/matrix/M = matrix(0, 4, MATRIX_SCALE) @@ -119,14 +119,14 @@ animate(time = 8, transform = M, alpha = 5) //Do nothing, essentially animate(transform = null, time = 5, color = "#ffffff", alpha = 255, pixel_y = 0, easing = ELASTIC_EASING) -/proc/animate_rainbow_glow_old(var/atom/A) +/proc/animate_rainbow_glow_old(atom/A) if(!istype(A)) return animate(A, color = "#FF0000", time = rand(5,10), loop = -1, easing = LINEAR_EASING) animate(color = "#00FF00", time = rand(5,10), loop = -1, easing = LINEAR_EASING) animate(color = "#0000FF", time = rand(5,10), loop = -1, easing = LINEAR_EASING) -/proc/animate_rainbow_glow(var/atom/A) +/proc/animate_rainbow_glow(atom/A) if(!istype(A)) return animate(A, color = "#FF0000", time = rand(5,10), loop = -1, easing = LINEAR_EASING) @@ -136,37 +136,37 @@ animate(color = "#0000FF", time = rand(5,10), loop = -1, easing = LINEAR_EASING) animate(color = "#FF00FF", time = rand(5,10), loop = -1, easing = LINEAR_EASING) -/proc/animate_fade_to_color_fill(var/atom/A, var/the_color, var/time) +/proc/animate_fade_to_color_fill(atom/A, the_color, time) if(!istype(A) || !the_color || !time) return animate(A, color = the_color, time = time, easing = LINEAR_EASING) -/proc/animate_flash_color_fill(var/atom/A, var/the_color, var/loops, var/time) +/proc/animate_flash_color_fill(atom/A, the_color, loops, time) if(!istype(A) || !the_color || !time || !loops) return animate(A, color = the_color, time = time, easing = LINEAR_EASING) animate(color = "#FFFFFF", time = 5, loop = loops, easing = LINEAR_EASING) -/proc/animate_flash_color_fill_inherit(var/atom/A, var/the_color, var/loops, var/time) +/proc/animate_flash_color_fill_inherit(atom/A, the_color, loops, time) if(!istype(A) || !the_color || !time || !loops) return var/color_old = A.color animate(A, color = the_color, time = time, loop = loops, easing = LINEAR_EASING) animate(A, color = color_old, time = time, loop = loops, easing = LINEAR_EASING) -/proc/animate_clownspell(var/atom/A) +/proc/animate_clownspell(atom/A) if(!istype(A)) return animate(A, transform = matrix(1.3, MATRIX_SCALE), time = 5, color = "#00ff00", easing = BACK_EASING) animate(transform = null, time = 5, color = "#ffffff", easing = ELASTIC_EASING) -/proc/animate_wiggle_then_reset(var/atom/A, var/loops = 5, var/speed = 5, var/x_var = 3, var/y_var = 3) +/proc/animate_wiggle_then_reset(atom/A, loops = 5, speed = 5, x_var = 3, y_var = 3) if(!istype(A) || !loops || !speed) return animate(A, pixel_x = rand(-x_var, x_var), pixel_y = rand(-y_var, y_var), time = speed * 2,loop = loops, easing = rand(2,7)) animate(pixel_x = 0, pixel_y = 0, time = speed, easing = rand(2,7)) -/proc/animate_spin(var/atom/A, var/dir = "L", var/T = 1, var/looping = -1) +/proc/animate_spin(atom/A, dir = "L", T = 1, looping = -1) if(!istype(A)) return @@ -180,7 +180,7 @@ animate(transform = matrix(M, turn, MATRIX_ROTATE | MATRIX_MODIFY), time = T, loop = looping) animate(transform = matrix(M, turn, MATRIX_ROTATE | MATRIX_MODIFY), time = T, loop = looping) -/proc/animate_shockwave(var/atom/A) +/proc/animate_shockwave(atom/A) if(!istype(A)) return var/punchstr = rand(10, 20) diff --git a/code/__HELPERS/_logging.dm b/code/__HELPERS/_logging.dm index 38176cd0981..34e7f3fda28 100644 --- a/code/__HELPERS/_logging.dm +++ b/code/__HELPERS/_logging.dm @@ -149,7 +149,7 @@ GLOBAL_PROTECT(log_end) // A logging proc that only outputs after setup is done, to // help devs test initialization stuff that happens a lot -/proc/log_after_setup(var/message) +/proc/log_after_setup(message) if(SSticker && SSticker.current_state > GAME_STATE_SETTING_UP) to_chat(world, "[message]") log_world(message) @@ -160,7 +160,7 @@ GLOBAL_PROTECT(log_end) // Helper procs for building detailed log lines -/proc/datum_info_line(var/datum/d) +/proc/datum_info_line(datum/d) if(!istype(d)) return if(!istype(d, /mob)) @@ -168,7 +168,7 @@ GLOBAL_PROTECT(log_end) var/mob/m = d return "[m] ([m.ckey]) ([m.type])" -/proc/atom_loc_line(var/atom/a) +/proc/atom_loc_line(atom/a) if(!istype(a)) return var/turf/t = get_turf(a) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index d76ffc005a0..63e527b59f2 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -51,7 +51,7 @@ // Like view but bypasses luminosity check -/proc/hear(var/range, var/atom/source) +/proc/hear(range, atom/source) var/lum = source.luminosity source.luminosity = 6 @@ -145,7 +145,7 @@ // It will keep doing this until it checks every content possible. This will fix any problems with mobs, that are inside objects, // being unable to hear people due to being in a box within a bag. -/proc/recursive_mob_check(var/atom/O, var/list/L = list(), var/recursion_limit = 3, var/client_check = 1, var/sight_check = 1, var/include_radio = 1) +/proc/recursive_mob_check(atom/O, list/L = list(), recursion_limit = 3, client_check = 1, sight_check = 1, include_radio = 1) //GLOB.debug_mob += O.contents.len if(!recursion_limit) @@ -174,7 +174,7 @@ // The old system would loop through lists for a total of 5000 per function call, in an empty server. // This new system will loop at around 1000 in an empty server. -/proc/get_mobs_in_view(var/R, var/atom/source, var/include_clientless = FALSE) +/proc/get_mobs_in_view(R, atom/source, include_clientless = FALSE) // Returns a list of mobs in range of R from source. Used in radio and say code. var/turf/T = get_turf(source) @@ -200,7 +200,7 @@ return hear -/proc/get_mobs_in_radio_ranges(var/list/obj/item/radio/radios) +/proc/get_mobs_in_radio_ranges(list/obj/item/radio/radios) . = list() // Returns a list of mobs who can hear any of the radios given in @radios var/list/speaker_coverage = list() @@ -263,7 +263,7 @@ return 0 return 1 -/proc/isInSight(var/atom/A, var/atom/B) +/proc/isInSight(atom/A, atom/B) var/turf/Aturf = get_turf(A) var/turf/Bturf = get_turf(B) @@ -293,7 +293,7 @@ if(AM.Move(get_step(T, direction))) break -/proc/get_mob_by_key(var/key) +/proc/get_mob_by_key(key) for(var/mob/M in GLOB.mob_list) if(M.ckey == lowertext(key)) return M @@ -339,16 +339,6 @@ O.screen_loc = screen_loc return O -/proc/Show2Group4Delay(obj/O, list/group, delay=0) - if(!isobj(O)) return - if(!group) group = GLOB.clients - for(var/client/C in group) - C.screen += O - if(delay) - spawn(delay) - for(var/client/C in group) - C.screen -= O - /proc/remove_images_from_clients(image/I, list/show_to) for(var/client/C in show_to) C.images -= I @@ -402,7 +392,7 @@ src.dest_x = dest_x src.dest_y = dest_y -/proc/projectile_trajectory(var/src_x, var/src_y, var/rotation, var/angle, var/power) +/proc/projectile_trajectory(src_x, src_y, rotation, angle, power) // returns the destination (Vx,y) that a projectile shot at [src_x], [src_y], with an angle of [angle], // rotated at [rotation] and with the power of [power] @@ -420,7 +410,7 @@ return new /datum/projectile_data(src_x, src_y, time, distance, power_x, power_y, dest_x, dest_y) -/proc/mobs_in_area(var/area/the_area, var/client_needed=0, var/moblist=GLOB.mob_list) +/proc/mobs_in_area(area/the_area, client_needed=0, moblist=GLOB.mob_list) var/list/mobs_found[0] var/area/our_area = get_area(the_area) for(var/mob/M in moblist) @@ -431,7 +421,7 @@ mobs_found += M return mobs_found -/proc/alone_in_area(var/area/the_area, var/mob/must_be_alone, var/check_type = /mob/living/carbon) +/proc/alone_in_area(area/the_area, mob/must_be_alone, check_type = /mob/living/carbon) var/area/our_area = get_area(the_area) for(var/C in GLOB.alive_mob_list) if(!istype(C, check_type)) diff --git a/code/__HELPERS/heap.dm b/code/__HELPERS/heap.dm index 50a11e71abb..c9ad037755f 100644 --- a/code/__HELPERS/heap.dm +++ b/code/__HELPERS/heap.dm @@ -33,7 +33,7 @@ Sink(1) //Get a node up to its right position in the heap -/datum/heap/proc/Swim(var/index) +/datum/heap/proc/Swim(index) var/parent = round(index * 0.5) while(parent > 0 && (call(cmp)(L[index], L[parent]) > 0)) @@ -42,7 +42,7 @@ parent = round(index * 0.5) //Get a node down to its right position in the heap -/datum/heap/proc/Sink(var/index) +/datum/heap/proc/Sink(index) var/g_child = GetGreaterChild(index) while(g_child > 0 && (call(cmp)(L[index], L[g_child]) < 0)) @@ -52,7 +52,7 @@ //Returns the greater (relative to the comparison proc) of a node children //or 0 if there's no child -/datum/heap/proc/GetGreaterChild(var/index) +/datum/heap/proc/GetGreaterChild(index) if(index * 2 > L.len) return 0 diff --git a/code/__HELPERS/icon_smoothing.dm b/code/__HELPERS/icon_smoothing.dm index caa8291b4bb..90873b6309a 100644 --- a/code/__HELPERS/icon_smoothing.dm +++ b/code/__HELPERS/icon_smoothing.dm @@ -289,7 +289,7 @@ //Icon smoothing helpers -/proc/smooth_zlevel(var/zlevel, now = FALSE) +/proc/smooth_zlevel(zlevel, now = FALSE) var/list/away_turfs = block(locate(1, 1, zlevel), locate(world.maxx, world.maxy, zlevel)) for(var/V in away_turfs) var/turf/T = V diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm index ef0f47b2f9c..78d9fb407bf 100644 --- a/code/__HELPERS/icons.dm +++ b/code/__HELPERS/icons.dm @@ -894,7 +894,7 @@ The _flatIcons list is a cache for generated icon files. composite.Blend(icon(I.icon, I.icon_state, I.dir, 1), ICON_OVERLAY) return composite -/proc/adjust_brightness(var/color, var/value) +/proc/adjust_brightness(color, value) if(!color) return "#FFFFFF" if(!value) return color @@ -904,7 +904,7 @@ The _flatIcons list is a cache for generated icon files. RGB[3] = clamp(RGB[3]+value,0,255) return rgb(RGB[1],RGB[2],RGB[3]) -/proc/sort_atoms_by_layer(var/list/atoms) +/proc/sort_atoms_by_layer(list/atoms) // Comb sort icons based on levels var/list/result = atoms.Copy() var/gap = result.len @@ -925,7 +925,7 @@ The _flatIcons list is a cache for generated icon files. //Interface for using DrawBox() to draw 1 pixel on a coordinate. //Returns the same icon specifed in the argument, but with the pixel drawn -/proc/DrawPixel(var/icon/I,var/colour,var/drawX,var/drawY) +/proc/DrawPixel(icon/I, colour, drawX, drawY) if(!I) return 0 var/Iwidth = I.Width() @@ -938,7 +938,7 @@ The _flatIcons list is a cache for generated icon files. return I //Interface for easy drawing of one pixel on an atom. -/atom/proc/DrawPixelOn(var/colour, var/drawX, var/drawY) +/atom/proc/DrawPixelOn(colour, drawX, drawY) var/icon/I = new(icon) var/icon/J = DrawPixel(I, colour, drawX, drawY) if(J) //Only set the icon if it succeeded, the icon without the pixel is 1000x better than a black square. @@ -961,7 +961,7 @@ The _flatIcons list is a cache for generated icon files. //Imagine removing pixels from the main icon that are covered by pixels from the mask icon. //Standard behaviour is to cut pixels from the main icon that are covered by pixels from the mask icon unless passed mask_ready, see below. -/proc/get_icon_difference(var/icon/main, var/icon/mask, var/mask_ready) +/proc/get_icon_difference(icon/main, icon/mask, mask_ready) /*You should skip prep if the mask is already sprited properly. This significantly improves performance by eliminating most of the realtime icon work. e.g. A 'ready' mask is a mask where the part you want cut out is missing (no pixels, 0 alpha) from the sprite, and everything else is solid white.*/ diff --git a/code/__HELPERS/lists.dm b/code/__HELPERS/lists.dm index aab920f55fd..bf0d7ab2b61 100644 --- a/code/__HELPERS/lists.dm +++ b/code/__HELPERS/lists.dm @@ -39,7 +39,7 @@ //Returns a list in plain english as a string -/proc/english_list(var/list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" ) +/proc/english_list(list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" ) var/total = input.len if(!total) return "[nothing_text]" @@ -60,7 +60,7 @@ return "[output][and_text][input[index]]" //Returns list element or null. Should prevent "index out of bounds" error. -/proc/listgetindex(var/list/list,index) +/proc/listgetindex(list/list, index) if(istype(list) && list.len) if(isnum(index)) if(InRange(index,1,list.len)) @@ -158,7 +158,7 @@ * If skiprep = 1, repeated elements are treated as one. * If either of arguments is not a list, returns null */ -/proc/difflist(var/list/first, var/list/second, var/skiprep=0) +/proc/difflist(list/first, list/second, skiprep=0) if(!islist(first) || !islist(second)) return var/list/result = new @@ -176,7 +176,7 @@ * If skipref = 1, repeated elements are treated as one. * If either of arguments is not a list, returns null */ -/proc/uniquemergelist(var/list/first, var/list/second, var/skiprep=0) +/proc/uniquemergelist(list/first, list/second, skiprep=0) if(!islist(first) || !islist(second)) return var/list/result = new @@ -236,7 +236,7 @@ return output //Randomize: Return the list in a random order -/proc/shuffle(var/list/L) +/proc/shuffle(list/L) if(!L) return L = L.Copy() @@ -247,20 +247,20 @@ return L //Return a list with no duplicate entries -/proc/uniquelist(var/list/L) +/proc/uniquelist(list/L) . = list() for(var/i in L) . |= i //Mergesort: divides up the list into halves to begin the sort -/proc/sortKey(var/list/client/L, var/order = 1) +/proc/sortKey(list/client/L, order = 1) if(isnull(L) || L.len < 2) return L var/middle = L.len / 2 + 1 return mergeKey(sortKey(L.Copy(0,middle)), sortKey(L.Copy(middle)), order) //Mergsort: does the actual sorting and returns the results back to sortAtom -/proc/mergeKey(var/list/client/L, var/list/client/R, var/order = 1) +/proc/mergeKey(list/client/L, list/client/R, order = 1) var/Li=1 var/Ri=1 var/list/result = new() @@ -277,7 +277,7 @@ return (result + R.Copy(Ri, 0)) //Mergesort: divides up the list into halves to begin the sort -/proc/sortAtom(var/list/atom/L, var/order = 1) +/proc/sortAtom(list/atom/L, order = 1) listclearnulls(L) if(isnull(L) || L.len < 2) return L @@ -285,7 +285,7 @@ return mergeAtoms(sortAtom(L.Copy(0,middle)), sortAtom(L.Copy(middle)), order) //Mergsort: does the actual sorting and returns the results back to sortAtom -/proc/mergeAtoms(var/list/atom/L, var/list/atom/R, var/order = 1) +/proc/mergeAtoms(list/atom/L, list/atom/R, order = 1) if(!L || !R) return 0 var/Li=1 var/Ri=1 @@ -306,7 +306,7 @@ //Mergesort: Specifically for record datums in a list. -/proc/sortRecord(var/list/datum/data/record/L, var/field = "name", var/order = 1) +/proc/sortRecord(list/datum/data/record/L, field = "name", order = 1) if(isnull(L)) return list() if(L.len < 2) @@ -315,7 +315,7 @@ return mergeRecordLists(sortRecord(L.Copy(0, middle), field, order), sortRecord(L.Copy(middle), field, order), field, order) //Mergsort: does the actual sorting and returns the results back to sortRecord -/proc/mergeRecordLists(var/list/datum/data/record/L, var/list/datum/data/record/R, var/field = "name", var/order = 1) +/proc/mergeRecordLists(list/datum/data/record/L, list/datum/data/record/R, field = "name", order = 1) var/Li=1 var/Ri=1 var/list/result = new() @@ -342,20 +342,20 @@ //Mergesort: any value in a list -/proc/sortList(var/list/L) +/proc/sortList(list/L) if(L.len < 2) return L var/middle = L.len / 2 + 1 // Copy is first,second-1 return mergeLists(sortList(L.Copy(0,middle)), sortList(L.Copy(middle))) //second parameter null = to end of list //Mergsorge: uses sortAssoc() but uses the var's name specifically. This should probably be using mergeAtom() instead -/proc/sortNames(var/list/L) +/proc/sortNames(list/L) var/list/Q = new() for(var/atom/x in L) Q[x.name] = x return sortAssoc(Q) -/proc/mergeLists(var/list/L, var/list/R) +/proc/mergeLists(list/L, list/R) var/Li=1 var/Ri=1 var/list/result = new() @@ -371,13 +371,13 @@ // List of lists, sorts by element[key] - for things like crew monitoring computer sorting records by name. -/proc/sortByKey(var/list/L, var/key) +/proc/sortByKey(list/L, key) if(L.len < 2) return L var/middle = L.len / 2 + 1 return mergeKeyedLists(sortByKey(L.Copy(0, middle), key), sortByKey(L.Copy(middle), key), key) -/proc/mergeKeyedLists(var/list/L, var/list/R, var/key) +/proc/mergeKeyedLists(list/L, list/R, key) var/Li=1 var/Ri=1 var/list/result = new() @@ -396,13 +396,13 @@ //Mergesort: any value in a list, preserves key=value structure -/proc/sortAssoc(var/list/L) +/proc/sortAssoc(list/L) if(L.len < 2) return L var/middle = L.len / 2 + 1 // Copy is first,second-1 return mergeAssoc(sortAssoc(L.Copy(0,middle)), sortAssoc(L.Copy(middle))) //second parameter null = to end of list -/proc/mergeAssoc(var/list/L, var/list/R) +/proc/mergeAssoc(list/L, list/R) var/Li=1 var/Ri=1 var/list/result = new() @@ -434,7 +434,7 @@ return r // Returns the key based on the index -/proc/get_key_by_index(var/list/L, var/index) +/proc/get_key_by_index(list/L, index) var/i = 1 for(var/key in L) if(index == i) @@ -442,7 +442,7 @@ i++ return null -/proc/count_by_type(var/list/L, type) +/proc/count_by_type(list/L, type) var/i = 0 for(var/T in L) if(istype(T, type)) @@ -450,7 +450,7 @@ return i //Don't use this on lists larger than half a dozen or so -/proc/insertion_sort_numeric_list_ascending(var/list/L) +/proc/insertion_sort_numeric_list_ascending(list/L) //log_world("ascending len input: [L.len]") var/list/out = list(pop(L)) for(var/entry in L) @@ -467,7 +467,7 @@ //log_world(" output: [out.len]") return out -/proc/insertion_sort_numeric_list_descending(var/list/L) +/proc/insertion_sort_numeric_list_descending(list/L) //log_world("descending len input: [L.len]") var/list/out = insertion_sort_numeric_list_ascending(L) //log_world(" output: [out.len]") @@ -483,13 +483,13 @@ if(islist(.[i])) .[i] = .(.[i]) -/proc/dd_sortedObjectList(var/list/L, var/cache=list()) +/proc/dd_sortedObjectList(list/L, list/cache = list()) if(L.len < 2) return L var/middle = L.len / 2 + 1 // Copy is first,second-1 return dd_mergeObjectList(dd_sortedObjectList(L.Copy(0,middle), cache), dd_sortedObjectList(L.Copy(middle), cache), cache) //second parameter null = to end of list -/proc/dd_mergeObjectList(var/list/L, var/list/R, var/list/cache) +/proc/dd_mergeObjectList(list/L, list/R, list/cache) var/Li=1 var/Ri=1 var/list/result = new() @@ -514,7 +514,7 @@ return (result + R.Copy(Ri, 0)) // Insert an object into a sorted list, preserving sortedness -/proc/dd_insertObjectList(var/list/L, var/O) +/proc/dd_insertObjectList(list/L, O) var/min = 1 var/max = L.len var/Oval = O:dd_SortValue() @@ -658,7 +658,7 @@ proc/dd_sortedObjectList(list/incoming) var/case_sensitive = 1 return dd_sortedtextlist(incoming, case_sensitive) -/proc/subtypesof(var/path) //Returns a list containing all subtypes of the given path, but not the given path itself. +/proc/subtypesof(path) //Returns a list containing all subtypes of the given path, but not the given path itself. if(!path || !ispath(path)) CRASH("Invalid path, failed to fetch subtypes of \"[path]\".") return (typesof(path) - path) diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index 841d42bf3ff..e836824ad3a 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -1,4 +1,4 @@ -/proc/GetOppositeDir(var/dir) +/proc/GetOppositeDir(dir) switch(dir) if(NORTH) return SOUTH if(SOUTH) return NORTH @@ -46,7 +46,7 @@ return pick(valid_picks) -/proc/random_hair_style(var/gender, species = "Human", var/datum/robolimb/robohead) +/proc/random_hair_style(gender, species = "Human", datum/robolimb/robohead) var/h_style = "Bald" var/list/valid_hairstyles = list() for(var/hairstyle in GLOB.hair_styles_public_list) @@ -75,7 +75,7 @@ return h_style -/proc/random_facial_hair_style(var/gender, species = "Human", var/datum/robolimb/robohead) +/proc/random_facial_hair_style(gender, species = "Human", datum/robolimb/robohead) var/f_style = "Shaved" var/list/valid_facial_hairstyles = list() for(var/facialhairstyle in GLOB.facial_hair_styles_list) @@ -119,7 +119,7 @@ return ha_style -/proc/random_marking_style(var/location = "body", species = "Human", var/datum/robolimb/robohead, var/body_accessory, var/alt_head) +/proc/random_marking_style(location = "body", species = "Human", datum/robolimb/robohead, body_accessory, alt_head) var/m_style = "None" var/list/valid_markings = list() for(var/marking in GLOB.marking_styles_list) diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index d6c95256585..970f90684bb 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -22,7 +22,7 @@ return html_encode(txt) //Simply removes < and > and limits the length of the message -/proc/strip_html_simple(var/t,var/limit=MAX_MESSAGE_LEN) +/proc/strip_html_simple(t, limit=MAX_MESSAGE_LEN) var/list/strip_chars = list("<",">") t = copytext(t,1,limit) for(var/char in strip_chars) @@ -33,13 +33,13 @@ return t //Removes a few problematic characters -/proc/sanitize_simple(var/t,var/list/repl_chars = list("\n"="#","\t"="#")) +/proc/sanitize_simple(t, list/repl_chars = list("\n"="#","\t"="#")) for(var/char in repl_chars) t = replacetext(t, char, repl_chars[char]) return t //Runs byond's sanitization proc along-side sanitize_simple -/proc/sanitize(var/t,var/list/repl_chars = null) +/proc/sanitize(t, list/repl_chars = null) return html_encode(sanitize_simple(t,repl_chars)) // Gut ANYTHING that isnt alphanumeric, or brackets @@ -54,7 +54,7 @@ //Runs sanitize and strip_html_simple //I believe strip_html_simple() is required to run first to prevent '<' from displaying as '<' after sanitize() calls byond's html_encode() -/proc/strip_html(var/t,var/limit=MAX_MESSAGE_LEN) +/proc/strip_html(t, limit=MAX_MESSAGE_LEN) return copytext((sanitize(strip_html_simple(t))),1,limit) // Used to get a properly sanitized multiline input, of max_length @@ -67,12 +67,12 @@ //Runs byond's sanitization proc along-side strip_html_simple //I believe strip_html_simple() is required to run first to prevent '<' from displaying as '<' that html_encode() would cause -/proc/adminscrub(var/t,var/limit=MAX_MESSAGE_LEN) +/proc/adminscrub(t, limit=MAX_MESSAGE_LEN) return copytext((html_encode(strip_html_simple(t))),1,limit) //Returns null if there is any bad text in the string -/proc/reject_bad_text(var/text, var/max_length=512) +/proc/reject_bad_text(text, max_length=512) if(length(text) > max_length) return //message too long var/non_whitespace = 0 for(var/i=1, i<=length(text), i++) @@ -106,7 +106,7 @@ return msg //Filters out undesirable characters from names -/proc/reject_bad_name(var/t_in, var/allow_numbers=0, var/max_length=MAX_NAME_LEN) +/proc/reject_bad_name(t_in, allow_numbers=0, max_length=MAX_NAME_LEN) // Decode so that names with characters like < are still rejected t_in = html_decode(t_in) if(!t_in || length(t_in) > max_length) @@ -174,7 +174,7 @@ //checks text for html tags //if tag is not in whitelist (var/list/paper_tag_whitelist in global.dm) //relpaces < with < -/proc/checkhtml(var/t) +/proc/checkhtml(t) t = sanitize_simple(t, list("&#"=".")) var/p = findtext(t,"<",1) while(p) //going through all the tags @@ -226,7 +226,7 @@ * Text modification */ // See bygex.dm -/proc/replace_characters(var/t,var/list/repl_chars) +/proc/replace_characters(t, list/repl_chars) for(var/char in repl_chars) t = replacetext(t, char, repl_chars[char]) return t @@ -277,7 +277,7 @@ return trim_left(trim_right(text)) //Returns a string with the first element of the string capitalized. -/proc/capitalize(var/t as text) +/proc/capitalize(t as text) return uppertext(copytext(t, 1, 2)) + copytext(t, 2) //Centers text by adding spaces to either side of the string. @@ -305,7 +305,7 @@ return copytext(message, 1, length + 1) -/proc/stringmerge(var/text,var/compare,replace = "*") +/proc/stringmerge(text, compare,replace = "*") //This proc fills in all spaces with the "replace" var (* by default) with whatever //is in the other string at the same spot (assuming it is not a replace char). //This is used for fingerprints @@ -326,7 +326,7 @@ return 0 return newtext -/proc/stringpercent(var/text,character = "*") +/proc/stringpercent(text, character = "*") //This proc returns the number of chars of the string that is the character //This is used for detective work to determine fingerprint completion. if(!text || !character) @@ -338,7 +338,7 @@ count++ return count -/proc/reverse_text(var/text = "") +/proc/reverse_text(text = "") var/new_text = "" for(var/i = length(text); i > 0; i--) new_text += copytext(text, i, i+1) @@ -347,7 +347,7 @@ //This proc strips html properly, but it's not lazy like the other procs. //This means that it doesn't just remove < and > and call it a day. //Also limit the size of the input, if specified. -/proc/strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN, allow_lines = 0) +/proc/strip_html_properly(input, max_length = MAX_MESSAGE_LEN, allow_lines = 0) if(!input) return var/opentag = 1 //These store the position of < and > respectively. @@ -371,12 +371,12 @@ input = copytext(input,1,max_length) return sanitize(input, allow_lines ? list("\t" = " ") : list("\n" = " ", "\t" = " ")) -/proc/trim_strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN, allow_lines = 0) +/proc/trim_strip_html_properly(input, max_length = MAX_MESSAGE_LEN, allow_lines = 0) return trim(strip_html_properly(input, max_length, allow_lines)) //Used in preferences' SetFlavorText and human's set_flavor verb //Previews a string of len or less length -/proc/TextPreview(var/string,var/len=40) +/proc/TextPreview(string, len=40) if(length(string) <= len) if(!length(string)) return "\[...\]" @@ -386,14 +386,14 @@ return "[copytext_preserve_html(string, 1, 37)]..." //alternative copytext() for encoded text, doesn't break html entities (" and other) -/proc/copytext_preserve_html(var/text, var/first, var/last) +/proc/copytext_preserve_html(text, first, last) return html_encode(copytext(html_decode(text), first, last)) //Run sanitize(), but remove <, >, " first to prevent displaying them as > < &34; in some places, after html_encode(). //Best used for sanitize object names, window titles. //If you have a problem with sanitize() in chat, when quotes and >, < are displayed as html entites - //this is a problem of double-encode(when & becomes &), use sanitize() with encode=0, but not the sanitizeSafe()! -/proc/sanitizeSafe(var/input, var/max_length = MAX_MESSAGE_LEN, var/encode = 1, var/trim = 1, var/extra = 1) +/proc/sanitizeSafe(input, max_length = MAX_MESSAGE_LEN, encode = 1, trim = 1, extra = 1) return sanitize(replace_characters(input, list(">"=" ","<"=" ", "\""="'")), max_length, encode, trim, extra) diff --git a/code/__HELPERS/time.dm b/code/__HELPERS/time.dm index a5524d7c719..5f6e01e93ed 100644 --- a/code/__HELPERS/time.dm +++ b/code/__HELPERS/time.dm @@ -62,7 +62,7 @@ return time2text(station_time(time, TRUE), format) /* Returns 1 if it is the selected month and day */ -/proc/isDay(var/month, var/day) +/proc/isDay(month, day) if(isnum(month) && isnum(day)) var/MM = text2num(time2text(world.timeofday, "MM")) // get the current month var/DD = text2num(time2text(world.timeofday, "DD")) // get the current day @@ -94,13 +94,13 @@ return GLOB.month_names.Find(number) //Take a value in seconds and returns a string of minutes and seconds in the format X minute(s) and X seconds. -/proc/seconds_to_time(var/seconds as num) +/proc/seconds_to_time(seconds as num) var/numSeconds = seconds % 60 var/numMinutes = (seconds - numSeconds) / 60 return "[numMinutes] [numMinutes > 1 ? "minutes" : "minute"] and [numSeconds] seconds" //Take a value in seconds and makes it display like a clock -/proc/seconds_to_clock(var/seconds as num) +/proc/seconds_to_clock(seconds as num) return "[add_zero(num2text((seconds / 60) % 60), 2)]:[add_zero(num2text(seconds % 60), 2)]" //Takes a value of time in deciseconds. diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm index bf44f6a4bc9..b962907d043 100644 --- a/code/__HELPERS/type2type.dm +++ b/code/__HELPERS/type2type.dm @@ -146,7 +146,7 @@ return //Converts an angle (degrees) into an ss13 direction -/proc/angle2dir(var/degree) +/proc/angle2dir(degree) degree = ((degree+22.5)%365) if(degree < 45) return NORTH if(degree < 90) return NORTHEAST @@ -170,7 +170,7 @@ //returns the north-zero clockwise angle in degrees, given a direction -/proc/dir2angle(var/D) +/proc/dir2angle(D) switch(D) if(NORTH) return 0 if(SOUTH) return 180 @@ -183,7 +183,7 @@ else return null //Returns the angle in english -/proc/angle2text(var/degree) +/proc/angle2text(degree) return dir2text(angle2dir(degree)) //Converts a blend_mode constant to one acceptable to icon.Blend() @@ -281,7 +281,7 @@ if(3*hue < 2) return (a+(b-a)*((2/3)-hue)*6) return a -/proc/num2septext(var/theNum, var/sigFig = 7,var/sep=",") // default sigFig (1,000,000) +/proc/num2septext(theNum, sigFig = 7, sep=",") // default sigFig (1,000,000) var/finalNum = num2text(theNum, sigFig) // Start from the end, or from the decimal point @@ -323,7 +323,7 @@ . = max(0, min(255, 138.5177312231 * log(temp - 10) - 305.0447927307)) //Argument: Give this a space-separated string consisting of 6 numbers. Returns null if you don't -/proc/text2matrix(var/matrixtext) +/proc/text2matrix(matrixtext) var/list/matrixtext_list = splittext(matrixtext, " ") var/list/matrix_list = list() for(var/item in matrixtext_list) @@ -351,7 +351,7 @@ //The string is well, obviously the string being checked //The datum is used as a source for var names, to check validity //Otherwise every single word could technically be a variable! -/proc/string2listofvars(var/t_string, var/datum/var_source) +/proc/string2listofvars(t_string, datum/var_source) if(!t_string || !var_source) return list() diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index be6385faf83..6e87e7d8c7a 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -5,7 +5,7 @@ /* Get the direction of startObj relative to endObj. * Return values: To the right, 1. Below, 2. To the left, 3. Above, 4. Not found adjacent in cardinal directions, 0. */ -/proc/getRelativeDirection(var/atom/movable/startObj, var/atom/movable/endObj) +/proc/getRelativeDirection(atom/movable/startObj, atom/movable/endObj) if(endObj.x == startObj.x + 1 && endObj.y == startObj.y) return EAST @@ -21,11 +21,11 @@ return 0 //Returns the middle-most value -/proc/dd_range(var/low, var/high, var/num) +/proc/dd_range(low, high, num) return max(low,min(high,num)) //Returns whether or not A is the middle most value -/proc/InRange(var/A, var/lower, var/upper) +/proc/InRange(A, lower, upper) if(A < lower) return 0 if(A > upper) return 0 return 1 @@ -152,7 +152,7 @@ Turf and target are seperate in case you want to teleport some distance from a t // Returns true if direction is blocked from loc // Checks if doors are open -/proc/DirBlocked(turf/loc,var/dir) +/proc/DirBlocked(turf/loc, dir) for(var/obj/structure/window/D in loc) if(!D.density) continue @@ -240,7 +240,7 @@ Turf and target are seperate in case you want to teleport some distance from a t return 1 //Ensure the frequency is within bounds of what it should be sending/recieving at -/proc/sanitize_frequency(var/f, var/low = PUBLIC_LOW_FREQ, var/high = PUBLIC_HIGH_FREQ) +/proc/sanitize_frequency(f, low = PUBLIC_LOW_FREQ, high = PUBLIC_HIGH_FREQ) f = round(f) f = max(low, f) f = min(high, f) @@ -249,10 +249,10 @@ Turf and target are seperate in case you want to teleport some distance from a t return f //Turns 1479 into 147.9 -/proc/format_frequency(var/f) +/proc/format_frequency(f) return "[round(f / 10)].[f % 10]" -/obj/proc/atmosanalyzer_scan(var/datum/gas_mixture/air_contents, mob/user, var/obj/target = src) +/obj/proc/atmosanalyzer_scan(datum/gas_mixture/air_contents, mob/user, obj/target = src) var/obj/icon = target user.visible_message("[user] has used the analyzer on [target].", "You use the analyzer on [target].") var/pressure = air_contents.return_pressure() @@ -320,7 +320,7 @@ Turf and target are seperate in case you want to teleport some distance from a t return selected -/proc/select_active_ai(var/mob/user) +/proc/select_active_ai(mob/user) var/list/ais = active_ais() if(ais.len) if(user) . = input(usr,"AI signals detected:", "AI selection") in ais @@ -438,7 +438,7 @@ Turf and target are seperate in case you want to teleport some distance from a t return DisplayJoules(units * SSmachines.wait * 0.1 / GLOB.CELLRATE) //Forces a variable to be posative -/proc/modulus(var/M) +/proc/modulus(M) if(M >= 0) return M if(M < 0) @@ -478,7 +478,7 @@ Turf and target are seperate in case you want to teleport some distance from a t Returns 1 if the chain up to the area contains the given typepath 0 otherwise */ -/atom/proc/is_found_within(var/typepath) +/atom/proc/is_found_within(typepath) var/atom/A = src while(A.loc) if(istype(A.loc, typepath)) @@ -494,7 +494,7 @@ Returns 1 if the chain up to the area contains the given typepath // returns the turf located at the map edge in the specified direction relative to A // used for mass driver -/proc/get_edge_target_turf(var/atom/A, var/direction) +/proc/get_edge_target_turf(atom/A, direction) var/turf/target = locate(A.x, A.y, A.z) if(!A || !target) @@ -518,7 +518,7 @@ Returns 1 if the chain up to the area contains the given typepath // result is bounded to map size // note range is non-pythagorean // used for disposal system -/proc/get_ranged_target_turf(var/atom/A, var/direction, var/range) +/proc/get_ranged_target_turf(atom/A, direction, range) var/x = A.x var/y = A.y @@ -536,17 +536,17 @@ Returns 1 if the chain up to the area contains the given typepath // returns turf relative to A offset in dx and dy tiles // bound to map limits -/proc/get_offset_target_turf(var/atom/A, var/dx, var/dy) +/proc/get_offset_target_turf(atom/A, dx, dy) var/x = min(world.maxx, max(1, A.x + dx)) var/y = min(world.maxy, max(1, A.y + dy)) return locate(x,y,A.z) //Makes sure MIDDLE is between LOW and HIGH. If not, it adjusts it. Returns the adjusted value. -/proc/between(var/low, var/middle, var/high) +/proc/between(low, middle, high) return max(min(middle, high), low) //returns random gauss number -/proc/GaussRand(var/sigma) +/proc/GaussRand(sigma) var/x,y,rsq do x=2*rand()-1 @@ -556,7 +556,7 @@ Returns 1 if the chain up to the area contains the given typepath return sigma*y*sqrt(-2*log(rsq)/rsq) //returns random gauss number, rounded to 'roundto' -/proc/GaussRandRound(var/sigma,var/roundto) +/proc/GaussRandRound(sigma, roundto) return round(GaussRand(sigma),roundto) //Will return the contents of an atom recursivly to a depth of 'searchDepth' @@ -579,7 +579,7 @@ Returns 1 if the chain up to the area contains the given typepath return weight //Step-towards method of determining whether one atom can see another. Similar to viewers() -/proc/can_see(var/atom/source, var/atom/target, var/length=5) // I couldnt be arsed to do actual raycasting :I This is horribly inaccurate. +/proc/can_see(atom/source, atom/target, length=5) // I couldnt be arsed to do actual raycasting :I This is horribly inaccurate. var/turf/current = get_turf(source) var/turf/target_turf = get_turf(target) var/steps = 1 @@ -609,7 +609,7 @@ Returns 1 if the chain up to the area contains the given typepath return 1 return 0 -/proc/get_step_towards2(var/atom/ref , var/atom/trg) +/proc/get_step_towards2(atom/ref , atom/trg) var/base_dir = get_dir(ref, get_step_towards(ref,trg)) var/turf/temp = get_step_towards(ref,trg) @@ -639,7 +639,7 @@ Returns 1 if the chain up to the area contains the given typepath //Takes: Anything that could possibly have variables and a varname to check. //Returns: 1 if found, 0 if not. -/proc/hasvar(var/datum/A, var/varname) +/proc/hasvar(datum/A, varname) if(A.vars.Find(lowertext(varname))) return 1 else return 0 @@ -656,7 +656,7 @@ Returns 1 if the chain up to the area contains the given typepath //Takes: Area type as text string or as typepath OR an instance of the area. //Returns: A list of all areas of that type in the world. -/proc/get_areas(var/areatype) +/proc/get_areas(areatype) if(!areatype) return null if(istext(areatype)) areatype = text2path(areatype) if(isarea(areatype)) @@ -670,7 +670,7 @@ Returns 1 if the chain up to the area contains the given typepath //Takes: Area type as text string or as typepath OR an instance of the area. //Returns: A list of all turfs in areas of that type of that type in the world. -/proc/get_area_turfs(var/areatype) +/proc/get_area_turfs(areatype) if(!areatype) return null if(istext(areatype)) areatype = text2path(areatype) if(isarea(areatype)) @@ -685,7 +685,7 @@ Returns 1 if the chain up to the area contains the given typepath //Takes: Area type as text string or as typepath OR an instance of the area. //Returns: A list of all atoms (objs, turfs, mobs) in areas of that type of that type in the world. -/proc/get_area_all_atoms(var/areatype) +/proc/get_area_all_atoms(areatype) if(!areatype) return null if(istext(areatype)) areatype = text2path(areatype) if(isarea(areatype)) @@ -704,7 +704,7 @@ Returns 1 if the chain up to the area contains the given typepath var/y_pos = null var/z_pos = null -/area/proc/move_contents_to(var/area/A, var/turftoleave=null, var/direction = null) +/area/proc/move_contents_to(area/A, turftoleave=null, direction = null) //Takes: Area. Optional: turf type to leave behind. //Returns: Nothing. //Notes: Attempts to move the contents of one area to another area. @@ -843,7 +843,7 @@ Returns 1 if the chain up to the area contains the given typepath -/proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0, var/atom/newloc = null) +/proc/DuplicateObject(obj/original, perfectcopy = 0 , sameloc = 0, atom/newloc = null) if(!original) return null @@ -870,7 +870,7 @@ Returns 1 if the chain up to the area contains the given typepath O.update_icon() return O -/area/proc/copy_contents_to(var/area/A , var/platingRequired = 0 ) +/area/proc/copy_contents_to(area/A , platingRequired = 0 ) //Takes: Area. Optional: If it should copy to areas that don't have plating //Returns: Nothing. //Notes: Attempts to move the contents of one area to another area. @@ -1099,7 +1099,7 @@ Returns 1 if the chain up to the area contains the given typepath //centered = 0 counts from turf edge to edge //centered = 1 counts from turf center to turf center //of course mathematically this is just adding world.icon_size on again -/proc/getPixelDistance(var/atom/A, var/atom/B, var/centered = 1) +/proc/getPixelDistance(atom/A, atom/B, centered = 1) if(!istype(A)||!istype(B)) return 0 . = bounds_dist(A, B) + sqrt((((A.pixel_x+B.pixel_x)**2) + ((A.pixel_y+B.pixel_y)**2))) @@ -1189,7 +1189,7 @@ GLOBAL_LIST_INIT(can_embed_types, typecacheof(list( return 1 return 0 -/proc/reverse_direction(var/dir) +/proc/reverse_direction(dir) switch(dir) if(NORTH) return SOUTH @@ -1264,7 +1264,7 @@ GLOBAL_LIST_INIT(wall_items, typecacheof(list(/obj/machinery/power/apc, /obj/mac Standard way to write links -Sayu */ -/proc/topic_link(var/datum/D, var/arglist, var/content) +/proc/topic_link(datum/D, arglist, content) if(istype(arglist,/list)) arglist = list2params(arglist) return "[content]" @@ -1375,7 +1375,7 @@ Standard way to write links -Sayu chance = max(chance - (initial_chance / steps), 0) steps-- -/proc/get_random_colour(var/simple, var/lower, var/upper) +/proc/get_random_colour(simple, lower, upper) var/colour if(simple) colour = pick(list("FF0000","FF7F00","FFFF00","00FF00","0000FF","4B0082","8F00FF")) @@ -1387,7 +1387,7 @@ Standard way to write links -Sayu colour += temp_col return colour -/proc/get_distant_turf(var/turf/T,var/direction,var/distance) +/proc/get_distant_turf(turf/T, direction, distance) if(!T || !direction || !distance) return var/dest_x = T.x @@ -1408,7 +1408,7 @@ Standard way to write links -Sayu GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) //Version of view() which ignores darkness, because BYOND doesn't have it. -/proc/dview(var/range = world.view, var/center, var/invis_flags = 0) +/proc/dview(range = world.view, center, invis_flags = 0) if(!center) return @@ -1577,7 +1577,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) //The y dimension of the icon file used in the image // eg: center_image(I, 32,32) // eg2: center_image(I, 96,96) -/proc/center_image(var/image/I, x_dimension = 0, y_dimension = 0) +/proc/center_image(image/I, x_dimension = 0, y_dimension = 0) if(!I) return @@ -1732,7 +1732,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) chosen = matches[chosen] return chosen -/proc/make_types_fancy(var/list/types) +/proc/make_types_fancy(list/types) if(ispath(types)) types = list(types) . = list() @@ -1965,7 +1965,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) result += (1 << num) return result -/proc/pixel_shift_dir(var/dir, var/amount_x = 32, var/amount_y = 32) //Returns a list with pixel_shift values that will shift an object's icon one tile in the direction passed. +/proc/pixel_shift_dir(dir, amount_x = 32, amount_y = 32) //Returns a list with pixel_shift values that will shift an object's icon one tile in the direction passed. amount_x = min(max(0, amount_x), 32) //No less than 0, no greater than 32. amount_y = min(max(0, amount_x), 32) var/list/shift = list("x" = 0, "y" = 0) diff --git a/code/_globalvars/lists/devil.dm b/code/_globalvars/lists/devil.dm deleted file mode 100644 index 54528709573..00000000000 --- a/code/_globalvars/lists/devil.dm +++ /dev/null @@ -1,8 +0,0 @@ -//what could possibly go wrong -GLOBAL_LIST_INIT(devil_machines, typecacheof(/obj/item/circuitboard, TRUE) - list( - /obj/item/circuitboard/shuttle, - /obj/item/circuitboard/swfdoor, - /obj/item/circuitboard/olddoor, - /obj/item/circuitboard/computer, - /obj/item/circuitboard/machine -)) diff --git a/code/_onclick/adjacent.dm b/code/_onclick/adjacent.dm index 58cfdf477f2..f9096ad6492 100644 --- a/code/_onclick/adjacent.dm +++ b/code/_onclick/adjacent.dm @@ -10,11 +10,11 @@ Note that in all cases the neighbor is handled simply; this is usually the user's mob, in which case it is up to you to check that the mob is not inside of something */ -/atom/proc/Adjacent(var/atom/neighbor) // basic inheritance, unused +/atom/proc/Adjacent(atom/neighbor) // basic inheritance, unused return 0 // Not a sane use of the function and (for now) indicative of an error elsewhere -/area/Adjacent(var/atom/neighbor) +/area/Adjacent(atom/neighbor) CRASH("Call to /area/Adjacent(), unimplemented proc") @@ -25,7 +25,7 @@ * If you are diagonally adjacent, ensure you can pass through at least one of the mutually adjacent square. * Passing through in this case ignores anything with the LETPASSTHROW flag, such as tables, racks, and morgue trays. */ -/turf/Adjacent(var/atom/neighbor, var/atom/target = null) +/turf/Adjacent(atom/neighbor, atom/target = null) var/turf/T0 = get_turf(neighbor) if(T0 == src) return 1 @@ -63,7 +63,7 @@ Note: Multiple-tile objects are created when the bound_width and bound_height are creater than the tile size. This is not used in stock /tg/station currently. */ -/atom/movable/Adjacent(var/atom/neighbor) +/atom/movable/Adjacent(atom/neighbor) if(neighbor == loc) return 1 if(!isturf(loc)) return 0 for(var/turf/T in locs) @@ -72,7 +72,7 @@ return 0 // This is necessary for storage items not on your person. -/obj/item/Adjacent(var/atom/neighbor, var/recurse = 1) +/obj/item/Adjacent(atom/neighbor, recurse = 1) if(neighbor == loc) return 1 if(istype(loc,/obj/item)) if(recurse > 0) @@ -85,7 +85,7 @@ This is defined as any dense ON_BORDER object, or any dense object without LETPASSTHROW. The border_only flag allows you to not objects (for source and destination squares) */ -/turf/proc/ClickCross(var/target_dir, var/border_only, var/target_atom = null) +/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)) continue // LETPASSTHROW is used for anything you can click through diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 8467c6dcb75..50ed1ff0903 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -196,7 +196,7 @@ return FALSE // Default behavior: ignore double clicks, consider them normal clicks instead -/mob/proc/DblClickOn(var/atom/A, var/params) +/mob/proc/DblClickOn(atom/A, params) return /* @@ -209,7 +209,7 @@ proximity_flag is not currently passed to attack_hand, and is instead used in human click code to allow glove touches only at melee range. */ -/mob/proc/UnarmedAttack(var/atom/A, var/proximity_flag) +/mob/proc/UnarmedAttack(atom/A, proximity_flag) if(ismob(A)) changeNext_move(CLICK_CD_MELEE) return @@ -230,14 +230,14 @@ Used when you are handcuffed and click things. Not currently used by anything but could easily be. */ -/mob/proc/RestrainedClickOn(var/atom/A) +/mob/proc/RestrainedClickOn(atom/A) return /* Middle click Only used for swapping hands */ -/mob/proc/MiddleClickOn(var/atom/A) +/mob/proc/MiddleClickOn(atom/A) pointed(A) return @@ -285,7 +285,7 @@ // In case of use break glass /* -/atom/proc/MiddleClick(var/mob/M as mob) +/atom/proc/MiddleClick(mob/M as mob) return */ @@ -294,10 +294,10 @@ For most mobs, examine. This is overridden in ai.dm */ -/mob/proc/ShiftClickOn(var/atom/A) +/mob/proc/ShiftClickOn(atom/A) A.ShiftClick(src) return -/atom/proc/ShiftClick(var/mob/user) +/atom/proc/ShiftClick(mob/user) if(user.client && get_turf(user.client.eye) == get_turf(user)) user.examinate(src) return @@ -306,7 +306,7 @@ Ctrl click For most objects, pull */ -/mob/proc/CtrlClickOn(var/atom/A) +/mob/proc/CtrlClickOn(atom/A) A.CtrlClick(src) return @@ -320,7 +320,7 @@ Alt click Unused except for AI */ -/mob/proc/AltClickOn(var/atom/A) +/mob/proc/AltClickOn(atom/A) A.AltClick(src) return @@ -331,7 +331,7 @@ else ..() -/atom/proc/AltClick(var/mob/user) +/atom/proc/AltClick(mob/user) var/turf/T = get_turf(src) if(T) if(user.TurfAdjacent(T)) @@ -342,25 +342,25 @@ user.listed_turf = null return -/mob/proc/TurfAdjacent(var/turf/T) +/mob/proc/TurfAdjacent(turf/T) return T.Adjacent(src) /* Control+Shift/Alt+Shift click Unused except for AI */ -/mob/proc/CtrlShiftClickOn(var/atom/A) +/mob/proc/CtrlShiftClickOn(atom/A) A.CtrlShiftClick(src) return -/atom/proc/CtrlShiftClick(var/mob/user) +/atom/proc/CtrlShiftClick(mob/user) return -/mob/proc/AltShiftClickOn(var/atom/A) +/mob/proc/AltShiftClickOn(atom/A) A.AltShiftClick(src) return -/atom/proc/AltShiftClick(var/mob/user) +/atom/proc/AltShiftClick(mob/user) return @@ -392,7 +392,7 @@ LE.fire() // Simple helper to face what you clicked on, in case it should be needed in more than one place -/mob/proc/face_atom(var/atom/A) +/mob/proc/face_atom(atom/A) if( stat || buckled || !A || !x || !y || !A.x || !A.y ) return var/dx = A.x - x var/dy = A.y - y diff --git a/code/_onclick/click_override.dm b/code/_onclick/click_override.dm index 1136af3eae4..0336c809511 100644 --- a/code/_onclick/click_override.dm +++ b/code/_onclick/click_override.dm @@ -12,7 +12,7 @@ /datum/middleClickOverride/ -/datum/middleClickOverride/proc/onClick(var/atom/A, var/mob/living/user) +/datum/middleClickOverride/proc/onClick(atom/A, mob/living/user) user.middleClickOverride = null return 1 /* Note, when making a new click override it is ABSOLUTELY VITAL that you set the source's clickOverride to null at some point if you don't want them to be stuck with it forever. @@ -35,7 +35,7 @@ /datum/middleClickOverride/badminClicker var/summon_path = /obj/item/reagent_containers/food/snacks/cookie -/datum/middleClickOverride/badminClicker/onClick(var/atom/A, var/mob/living/user) +/datum/middleClickOverride/badminClicker/onClick(atom/A, mob/living/user) var/atom/movable/newObject = new summon_path newObject.loc = get_turf(A) to_chat(user, "You release the power you had stored up, summoning \a [newObject.name]! ") diff --git a/code/_onclick/hud/_defines.dm b/code/_onclick/hud/_defines.dm index 58fd73656cb..91fe0c99bf7 100644 --- a/code/_onclick/hud/_defines.dm +++ b/code/_onclick/hud/_defines.dm @@ -22,7 +22,6 @@ //Middle left indicators #define ui_lingchemdisplay "WEST:6,CENTER-1:15" #define ui_lingstingdisplay "WEST:6,CENTER-3:11" -#define ui_devilsouldisplay "WEST:6,CENTER-1:15" //Lower center, persistant menu #define ui_sstore1 "CENTER-5:10,SOUTH:5" diff --git a/code/_onclick/hud/devil.dm b/code/_onclick/hud/devil.dm deleted file mode 100644 index 53f7265c6a4..00000000000 --- a/code/_onclick/hud/devil.dm +++ /dev/null @@ -1,87 +0,0 @@ - -//Soul counter is stored with the humans, it does weird when you place it here apparently... - - -/datum/hud/devil/New(mob/owner, ui_style = 'icons/mob/screen_midnight.dmi') - ..() - - var/obj/screen/using - var/obj/screen/inventory/inv_box - - using = new /obj/screen/drop() - using.icon = ui_style - using.screen_loc = ui_drop_throw - static_inventory += using - - mymob.pullin = new /obj/screen/pull() - mymob.pullin.icon = ui_style - mymob.pullin.update_icon(mymob) - mymob.pullin.screen_loc = ui_pull_resist - static_inventory += mymob.pullin - - inv_box = new /obj/screen/inventory/hand() - inv_box.name = "right hand" - inv_box.icon = ui_style - inv_box.icon_state = "hand_r" - inv_box.screen_loc = ui_rhand - inv_box.slot_id = slot_r_hand - static_inventory += inv_box - - inv_box = new /obj/screen/inventory/hand() - inv_box.name = "left hand" - inv_box.icon = ui_style - inv_box.icon_state = "hand_l" - inv_box.screen_loc = ui_lhand - inv_box.slot_id = slot_l_hand - static_inventory += inv_box - - using = new /obj/screen/swap_hand() - using.name = "hand" - using.icon = ui_style - using.icon_state = "swap_1" - using.screen_loc = ui_swaphand1 - static_inventory += using - - using = new /obj/screen/swap_hand() - using.name = "hand" - using.icon = ui_style - using.icon_state = "swap_2" - using.screen_loc = ui_swaphand2 - static_inventory += using - - zone_select = new /obj/screen/zone_sel() - zone_select.icon = ui_style - zone_select.update_icon(mymob) - - lingchemdisplay = new /obj/screen/ling/chems() - devilsouldisplay = new /obj/screen/devil/soul_counter - infodisplay += devilsouldisplay - - for(var/obj/screen/inventory/inv in static_inventory) - if(inv.slot_id) - inv.hud = src - inv_slots[inv.slot_id] = inv - inv.update_icon() - - -/datum/hud/devil/persistent_inventory_update() - if(!mymob) - return - var/mob/living/carbon/true_devil/D = mymob - - if(hud_version != HUD_STYLE_NOHUD) - if(D.r_hand) - D.r_hand.screen_loc = ui_rhand - D.client.screen += D.r_hand - if(D.l_hand) - D.l_hand.screen_loc = ui_lhand - D.client.screen += D.l_hand - else - if(D.r_hand) - D.r_hand.screen_loc = null - if(D.l_hand) - D.l_hand.screen_loc = null - -/mob/living/carbon/true_devil/create_mob_hud() - if(client && !hud_used) - hud_used = new /datum/hud/devil(src, ui_style2icon(client.prefs.UI_style)) diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index c8d8a7d2290..0cfb6985b8e 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -27,8 +27,6 @@ var/obj/screen/move_intent var/obj/screen/module_store_icon - var/obj/screen/devil/soul_counter/devilsouldisplay - var/list/static_inventory = list() //the screen objects which are static var/list/toggleable_inventory = list() //the screen objects which can be hidden var/list/hotkeybuttons = list() //the buttons that can be used via hotkeys @@ -89,7 +87,6 @@ alien_plasma_display = null vampire_blood_display = null nightvisionicon = null - devilsouldisplay = null QDEL_LIST_ASSOC_VAL(plane_masters) diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index 5b4ce4c99e9..8f125079d6b 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -36,35 +36,6 @@ var/mob/living/carbon/U = usr U.unset_sting() -/obj/screen/devil - invisibility = INVISIBILITY_ABSTRACT - -/obj/screen/devil/soul_counter - icon = 'icons/mob/screen_gen.dmi' - name = "souls owned" - icon_state = "Devil-6" - screen_loc = ui_devilsouldisplay - -/obj/screen/devil/soul_counter/proc/update_counter(souls = 0) - invisibility = 0 - maptext = "
[souls]
" - switch(souls) - if(0,null) - icon_state = "Devil-1" - if(1,2) - icon_state = "Devil-2" - if(3 to 5) - icon_state = "Devil-3" - if(6 to 8) - icon_state = "Devil-4" - if(9 to INFINITY) - icon_state = "Devil-5" - else - icon_state = "Devil-6" - -/obj/screen/devil/soul_counter/proc/clear() - invisibility = INVISIBILITY_ABSTRACT - /obj/screen/ling/chems name = "chemical storage" icon_state = "power_display" @@ -85,7 +56,7 @@ /datum/hud/human var/hud_alpha = 255 -/datum/hud/human/New(mob/living/carbon/human/owner, var/ui_style = 'icons/mob/screen_white.dmi', var/ui_color = "#ffffff", var/ui_alpha = 255) +/datum/hud/human/New(mob/living/carbon/human/owner, ui_style = 'icons/mob/screen_white.dmi', ui_color = "#ffffff", ui_alpha = 255) ..() owner.overlay_fullscreen("see_through_darkness", /obj/screen/fullscreen/see_through_darkness) @@ -372,9 +343,6 @@ lingstingdisplay = new /obj/screen/ling/sting() infodisplay += lingstingdisplay - devilsouldisplay = new /obj/screen/devil/soul_counter - infodisplay += devilsouldisplay - zone_select = new /obj/screen/zone_sel() zone_select.color = ui_color zone_select.icon = ui_style diff --git a/code/_onclick/observer.dm b/code/_onclick/observer.dm index 073fab88b34..774f111f1e5 100644 --- a/code/_onclick/observer.dm +++ b/code/_onclick/observer.dm @@ -1,4 +1,4 @@ -/mob/dead/observer/DblClickOn(var/atom/A, var/params) +/mob/dead/observer/DblClickOn(atom/A, params) if(client.click_intercept) // Not doing a click intercept here, because otherwise we double-tap with the `ClickOn` proc. // But we return here since we don't want to do regular dblclick handling @@ -18,7 +18,7 @@ forceMove(get_turf(A)) update_parallax_contents() -/mob/dead/observer/ClickOn(var/atom/A, var/params) +/mob/dead/observer/ClickOn(atom/A, params) if(client.click_intercept) client.click_intercept.InterceptClickOn(src, params, A) return @@ -55,7 +55,7 @@ A.attack_ghost(src) // We don't need a fucking toggle. -/mob/dead/observer/ShiftClickOn(var/atom/A) +/mob/dead/observer/ShiftClickOn(atom/A) examinate(A) /atom/proc/attack_ghost(mob/user) diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index 3720f9bdb2e..b2338937ebc 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -28,11 +28,11 @@ return /* -/mob/living/carbon/human/RestrainedClickOn(var/atom/A) -- Handled by carbons +/mob/living/carbon/human/RestrainedClickOn(atom/A) -- Handled by carbons return */ -/mob/living/carbon/RestrainedClickOn(var/atom/A) +/mob/living/carbon/RestrainedClickOn(atom/A) return 0 /mob/living/carbon/human/RangedAttack(atom/A, params) @@ -54,17 +54,17 @@ /* Animals & All Unspecified */ -/mob/living/UnarmedAttack(var/atom/A) +/mob/living/UnarmedAttack(atom/A) A.attack_animal(src) -/mob/living/simple_animal/hostile/UnarmedAttack(var/atom/A) +/mob/living/simple_animal/hostile/UnarmedAttack(atom/A) target = A AttackingTarget() /atom/proc/attack_animal(mob/user) return -/mob/living/RestrainedClickOn(var/atom/A) +/mob/living/RestrainedClickOn(atom/A) return /* @@ -109,5 +109,5 @@ return // pAIs are not intended to interact with anything in the world -/mob/living/silicon/pai/UnarmedAttack(var/atom/A) +/mob/living/silicon/pai/UnarmedAttack(atom/A) return diff --git a/code/_onclick/overmind.dm b/code/_onclick/overmind.dm index 419524c8711..40c60b99268 100644 --- a/code/_onclick/overmind.dm +++ b/code/_onclick/overmind.dm @@ -1,7 +1,7 @@ // Blob Overmind Controls -/mob/camera/blob/ClickOn(var/atom/A, var/params) //Expand blob +/mob/camera/blob/ClickOn(atom/A, params) //Expand blob var/list/modifiers = params2list(params) if(modifiers["middle"]) MiddleClickOn(A) diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm index df9c8ea1fae..342af86c0b6 100644 --- a/code/_onclick/telekinesis.dm +++ b/code/_onclick/telekinesis.dm @@ -87,7 +87,7 @@ //stops TK grabs being equipped anywhere but into hands -/obj/item/tk_grab/equipped(mob/user, var/slot) +/obj/item/tk_grab/equipped(mob/user, slot) if( (slot == slot_l_hand) || (slot== slot_r_hand) ) return qdel(src) @@ -151,7 +151,7 @@ if(!.) return I == focus -/obj/item/tk_grab/proc/focus_object(var/obj/target, var/mob/user) +/obj/item/tk_grab/proc/focus_object(obj/target, mob/user) if(!istype(target,/obj)) return//Cant throw non objects atm might let it do mobs later if(target.anchored || !isturf(target.loc)) diff --git a/code/controllers/subsystem/air.dm b/code/controllers/subsystem/air.dm index 6b08efe7b38..324df11b8d1 100644 --- a/code/controllers/subsystem/air.dm +++ b/code/controllers/subsystem/air.dm @@ -283,7 +283,7 @@ SUBSYSTEM_DEF(air) for(var/turf/simulated/S in T.atmos_adjacent_turfs) add_to_active(S) -/datum/controller/subsystem/air/proc/setup_allturfs(var/list/turfs_to_init = block(locate(1, 1, 1), locate(world.maxx, world.maxy, world.maxz))) +/datum/controller/subsystem/air/proc/setup_allturfs(list/turfs_to_init = block(locate(1, 1, 1), locate(world.maxx, world.maxy, world.maxz))) var/list/active_turfs = src.active_turfs // Clear active turfs - faster than removing every single turf in the world @@ -321,7 +321,7 @@ SUBSYSTEM_DEF(air) ET.excited = 1 . += ET -/datum/controller/subsystem/air/proc/setup_atmos_machinery(var/list/machines_to_init) +/datum/controller/subsystem/air/proc/setup_atmos_machinery(list/machines_to_init) var/watch = start_watch() log_startup_progress("Initializing atmospherics machinery...") var/count = _setup_atmos_machinery(machines_to_init) @@ -329,7 +329,7 @@ SUBSYSTEM_DEF(air) // this underscored variant is so that we can have a means of late initing // atmos machinery without a loud announcement to the world -/datum/controller/subsystem/air/proc/_setup_atmos_machinery(var/list/machines_to_init) +/datum/controller/subsystem/air/proc/_setup_atmos_machinery(list/machines_to_init) var/count = 0 for(var/obj/machinery/atmospherics/A in machines_to_init) A.atmos_init() @@ -345,7 +345,7 @@ SUBSYSTEM_DEF(air) //this can't be done with setup_atmos_machinery() because // all atmos machinery has to initalize before the first // pipenet can be built. -/datum/controller/subsystem/air/proc/setup_pipenets(var/list/pipes) +/datum/controller/subsystem/air/proc/setup_pipenets(list/pipes) var/watch = start_watch() log_startup_progress("Initializing pipe networks...") var/count = _setup_pipenets(pipes) @@ -353,7 +353,7 @@ SUBSYSTEM_DEF(air) // An underscored wrapper that exists for the same reason // the machine init wrapper does -/datum/controller/subsystem/air/proc/_setup_pipenets(var/list/pipes) +/datum/controller/subsystem/air/proc/_setup_pipenets(list/pipes) var/count = 0 for(var/obj/machinery/atmospherics/machine in pipes) machine.build_network() diff --git a/code/controllers/subsystem/jobs.dm b/code/controllers/subsystem/jobs.dm index 504f263247b..c7e18522392 100644 --- a/code/controllers/subsystem/jobs.dm +++ b/code/controllers/subsystem/jobs.dm @@ -29,7 +29,7 @@ SUBSYSTEM_DEF(jobs) return batch_update_player_exp(announce = FALSE) // Set this to true if you ever want to inform players about their EXP gains -/datum/controller/subsystem/jobs/proc/SetupOccupations(var/list/faction = list("Station")) +/datum/controller/subsystem/jobs/proc/SetupOccupations(list/faction = list("Station")) occupations = list() var/list/all_jobs = subtypesof(/datum/job) if(!all_jobs.len) @@ -47,7 +47,7 @@ SUBSYSTEM_DEF(jobs) return 1 -/datum/controller/subsystem/jobs/proc/Debug(var/text) +/datum/controller/subsystem/jobs/proc/Debug(text) if(!GLOB.debug2) return 0 job_debug.Add(text) @@ -67,7 +67,7 @@ SUBSYSTEM_DEF(jobs) /datum/controller/subsystem/jobs/proc/GetPlayerAltTitle(mob/new_player/player, rank) return player.client.prefs.GetPlayerAltTitle(GetJob(rank)) -/datum/controller/subsystem/jobs/proc/AssignRole(var/mob/new_player/player, var/rank, var/latejoin = 0) +/datum/controller/subsystem/jobs/proc/AssignRole(mob/new_player/player, rank, latejoin = 0) Debug("Running AR, Player: [player], Rank: [rank], LJ: [latejoin]") if(player && player.mind && rank) var/datum/job/job = GetJob(rank) @@ -110,7 +110,7 @@ SUBSYSTEM_DEF(jobs) Debug("AR has failed, Player: [player], Rank: [rank]") return 0 -/datum/controller/subsystem/jobs/proc/FreeRole(var/rank) //making additional slot on the fly +/datum/controller/subsystem/jobs/proc/FreeRole(rank) //making additional slot on the fly var/datum/job/job = GetJob(rank) if(job && job.current_positions >= job.total_positions && job.total_positions != -1) job.total_positions++ @@ -145,7 +145,7 @@ SUBSYSTEM_DEF(jobs) candidates += player return candidates -/datum/controller/subsystem/jobs/proc/GiveRandomJob(var/mob/new_player/player) +/datum/controller/subsystem/jobs/proc/GiveRandomJob(mob/new_player/player) Debug("GRJ Giving random job, Player: [player]") for(var/datum/job/job in shuffle(occupations)) if(!job) @@ -229,7 +229,7 @@ SUBSYSTEM_DEF(jobs) ///This proc is called at the start of the level loop of DivideOccupations() and will cause head jobs to be checked before any other jobs of the same level -/datum/controller/subsystem/jobs/proc/CheckHeadPositions(var/level) +/datum/controller/subsystem/jobs/proc/CheckHeadPositions(level) for(var/command_position in GLOB.command_positions) var/datum/job/job = GetJob(command_position) if(!job) @@ -409,7 +409,7 @@ SUBSYSTEM_DEF(jobs) log_debug("Dividing Occupations took [stop_watch(watch)]s") return 1 -/datum/controller/subsystem/jobs/proc/AssignRank(var/mob/living/carbon/human/H, var/rank, var/joined_late = 0) +/datum/controller/subsystem/jobs/proc/AssignRank(mob/living/carbon/human/H, rank, joined_late = 0) if(!H) return null var/datum/job/job = GetJob(rank) diff --git a/code/controllers/subsystem/radio.dm b/code/controllers/subsystem/radio.dm index 2cedc36c14e..533588173ba 100644 --- a/code/controllers/subsystem/radio.dm +++ b/code/controllers/subsystem/radio.dm @@ -26,7 +26,7 @@ SUBSYSTEM_DEF(radio) var/list/datum/radio_frequency/frequencies = list() // This is fucking disgusting and needs to die -/datum/controller/subsystem/radio/proc/frequency_span_class(var/frequency) +/datum/controller/subsystem/radio/proc/frequency_span_class(frequency) // Antags! if(frequency in ANTAG_FREQS) return "syndradio" @@ -62,7 +62,7 @@ SUBSYSTEM_DEF(radio) return "radio" -/datum/controller/subsystem/radio/proc/add_object(obj/device as obj, var/new_frequency as num, var/filter = null as text|null) +/datum/controller/subsystem/radio/proc/add_object(obj/device as obj, new_frequency as num, filter = null as text|null) var/f_text = num2text(new_frequency) var/datum/radio_frequency/frequency = frequencies[f_text] @@ -87,7 +87,7 @@ SUBSYSTEM_DEF(radio) return 1 -/datum/controller/subsystem/radio/proc/return_frequency(var/new_frequency as num) +/datum/controller/subsystem/radio/proc/return_frequency(new_frequency as num) var/f_text = num2text(new_frequency) var/datum/radio_frequency/frequency = frequencies[f_text] diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index a6918b665c7..e4f5a6d6ecf 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -125,14 +125,14 @@ SUBSYSTEM_DEF(ticker) current_state = GAME_STATE_FINISHED Master.SetRunLevel(RUNLEVEL_POSTGAME) // This shouldnt process more than once, but you never know auto_toggle_ooc(TRUE) // Turn it on - declare_completion() + addtimer(CALLBACK(src, .proc/call_reboot), 5 SECONDS) - spawn(50) - if(mode.station_was_nuked) - reboot_helper("Station destroyed by Nuclear Device.", "nuke") - else - reboot_helper("Round ended.", "proper completion") +/datum/controller/subsystem/ticker/proc/call_reboot() + if(mode.station_was_nuked) + reboot_helper("Station destroyed by Nuclear Device.", "nuke") + else + reboot_helper("Round ended.", "proper completion") /datum/controller/subsystem/ticker/proc/setup() cultdat = setupcult() diff --git a/code/controllers/subsystem/tickets/tickets.dm b/code/controllers/subsystem/tickets/tickets.dm index 2441d6521f8..24919f801f5 100644 --- a/code/controllers/subsystem/tickets/tickets.dm +++ b/code/controllers/subsystem/tickets/tickets.dm @@ -597,7 +597,7 @@ UI STUFF else usr.client.resolveAllAdminTickets() -/datum/controller/subsystem/tickets/proc/takeTicket(var/index) +/datum/controller/subsystem/tickets/proc/takeTicket(index) if(assignStaffToTicket(usr.client, index)) if(span_class == "mentorhelp") message_staff("[usr.client] / ([usr]) has taken [ticket_name] number [index]") diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index 4284097b392..346297d900f 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -184,7 +184,7 @@ SUBSYSTEM_DEF(vote) return . -/datum/controller/subsystem/vote/proc/submit_vote(var/ckey, var/vote) +/datum/controller/subsystem/vote/proc/submit_vote(ckey, vote) if(mode) if(config.vote_no_dead && usr.stat == DEAD && !usr.client.holder) return 0 @@ -197,7 +197,7 @@ SUBSYSTEM_DEF(vote) return vote return 0 -/datum/controller/subsystem/vote/proc/initiate_vote(var/vote_type, var/initiator_key) +/datum/controller/subsystem/vote/proc/initiate_vote(vote_type, initiator_key) if(!mode) if(started_time != null && !check_rights(R_ADMIN)) var/next_allowed_time = (started_time + config.vote_delay) @@ -280,7 +280,7 @@ SUBSYSTEM_DEF(vote) return 1 return 0 -/datum/controller/subsystem/vote/proc/browse_to(var/client/C) +/datum/controller/subsystem/vote/proc/browse_to(client/C) if(!C) return var/admin = check_rights(R_ADMIN, 0, user = C.mob) @@ -330,10 +330,10 @@ SUBSYSTEM_DEF(vote) popup.set_content(dat) popup.open() -/datum/controller/subsystem/vote/proc/update_panel(var/client/C) +/datum/controller/subsystem/vote/proc/update_panel(client/C) C << output(url_encode(vote_html(C)), "vote.browser:update_vote_div") -/datum/controller/subsystem/vote/proc/vote_html(var/client/C) +/datum/controller/subsystem/vote/proc/vote_html(client/C) . = "" if(question) . += "

Vote: '[question]'

" diff --git a/code/datums/action.dm b/code/datums/action.dm index 8d02d4622cf..79dbd4bd2cf 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -17,7 +17,7 @@ var/button_icon_state = "default" var/mob/owner -/datum/action/New(var/Target) +/datum/action/New(Target) target = Target button = new button.linked_action = src diff --git a/code/datums/ai_laws.dm b/code/datums/ai_laws.dm index a37d767542f..9fee24101d0 100644 --- a/code/datums/ai_laws.dm +++ b/code/datums/ai_laws.dm @@ -17,10 +17,6 @@ /datum/ai_law/zero/get_index() return 0 -/datum/ai_law/sixsixsix/get_index() - return 666 - - /datum/ai_laws var/name = "Unknown Laws" var/law_header = "Prime Directives" @@ -31,11 +27,9 @@ var/list/datum/ai_law/inherent_laws = list() var/list/datum/ai_law/supplied_laws = list() var/list/datum/ai_law/ion/ion_laws = list() - var/list/datum/ai_law/sixsixsix/devil_laws = list() var/list/datum/ai_law/sorted_laws = list() var/state_zeroth = 0 - var/list/state_devil = list() var/list/state_ion = list() var/list/state_inherent = list() var/list/state_supplied = list() @@ -68,9 +62,6 @@ for(var/ion_law in ion_laws) sorted_laws += ion_law - for(var/evil_law in devil_laws) - sorted_laws += evil_law - var/index = 1 for(var/datum/ai_law/inherent_law in inherent_laws) inherent_law.index = index++ @@ -81,7 +72,7 @@ if(istype(AL)) sorted_laws += AL -/datum/ai_laws/proc/sync(var/mob/living/silicon/S, var/full_sync = 1) +/datum/ai_laws/proc/sync(mob/living/silicon/S, full_sync = 1) // Add directly to laws to avoid log-spam S.sync_zeroth(zeroth_law, zeroth_law_borg) @@ -101,7 +92,7 @@ S.laws.add_supplied_law(law.index, law.law) -/mob/living/silicon/proc/sync_zeroth(var/datum/ai_law/zeroth_law, var/datum/ai_law/zeroth_law_borg) +/mob/living/silicon/proc/sync_zeroth(datum/ai_law/zeroth_law, datum/ai_law/zeroth_law_borg) if(!is_special_character(src) || mind.original != src) if(zeroth_law_borg) laws.set_zeroth_law(zeroth_law_borg.law) @@ -110,14 +101,14 @@ else laws.clear_zeroth_laws() -/mob/living/silicon/ai/sync_zeroth(var/datum/ai_law/zeroth_law, var/datum/ai_law/zeroth_law_borg) +/mob/living/silicon/ai/sync_zeroth(datum/ai_law/zeroth_law, datum/ai_law/zeroth_law_borg) if(zeroth_law) laws.set_zeroth_law(zeroth_law.law, zeroth_law_borg ? zeroth_law_borg.law : null) /**************** * Add Laws * ****************/ -/datum/ai_laws/proc/set_zeroth_law(var/law, var/law_borg = null) +/datum/ai_laws/proc/set_zeroth_law(law, law_borg = null) if(!law) return @@ -128,22 +119,7 @@ zeroth_law_borg = null sorted_laws.Cut() -/datum/ai_laws/proc/set_sixsixsix_law(var/law) - if(!law) - return - - for(var/datum/ai_law/AL in devil_laws) - if(AL.law == law) - return - - var/new_law = new/datum/ai_law/sixsixsix(law) - devil_laws += new_law - if(state_devil.len < devil_laws.len) - state_devil += 1 - - sorted_laws.Cut() - -/datum/ai_laws/proc/add_ion_law(var/law) +/datum/ai_laws/proc/add_ion_law(law) if(!law) return @@ -158,7 +134,7 @@ sorted_laws.Cut() -/datum/ai_laws/proc/add_inherent_law(var/law) +/datum/ai_laws/proc/add_inherent_law(law) if(!law) return @@ -173,7 +149,7 @@ sorted_laws.Cut() -/datum/ai_laws/proc/add_supplied_law(var/number, var/law) +/datum/ai_laws/proc/add_supplied_law(number, law) if(!law) return @@ -200,31 +176,28 @@ /**************** * Remove Laws * *****************/ -/datum/ai_laws/proc/delete_law(var/datum/ai_law/law) +/datum/ai_laws/proc/delete_law(datum/ai_law/law) if(istype(law)) law.delete_law(src) -/datum/ai_law/proc/delete_law(var/datum/ai_laws/laws) +/datum/ai_law/proc/delete_law(datum/ai_laws/laws) -/datum/ai_law/zero/delete_law(var/datum/ai_laws/laws) +/datum/ai_law/zero/delete_law(datum/ai_laws/laws) laws.clear_zeroth_laws() -/datum/ai_law/ion/delete_law(var/datum/ai_laws/laws) +/datum/ai_law/ion/delete_law(datum/ai_laws/laws) laws.internal_delete_law(laws.ion_laws, laws.state_ion, src) -/datum/ai_law/sixsixsix/delete_law(var/datum/ai_laws/laws) - laws.internal_delete_law(laws.devil_laws, laws.state_devil, src) - -/datum/ai_law/inherent/delete_law(var/datum/ai_laws/laws) +/datum/ai_law/inherent/delete_law(datum/ai_laws/laws) laws.internal_delete_law(laws.inherent_laws, laws.state_inherent, src) -/datum/ai_law/supplied/delete_law(var/datum/ai_laws/laws) +/datum/ai_law/supplied/delete_law(datum/ai_laws/laws) var/index = laws.supplied_laws.Find(src) if(index) laws.supplied_laws[index] = "" laws.state_supplied[index] = 1 -/datum/ai_laws/proc/internal_delete_law(var/list/datum/ai_law/laws, var/list/state, var/list/datum/ai_law/law) +/datum/ai_laws/proc/internal_delete_law(list/datum/ai_law/laws, list/state, list/datum/ai_law/law) var/index = laws.Find(law) if(index) laws -= law @@ -239,10 +212,6 @@ zeroth_law = null zeroth_law_borg = null -/datum/ai_laws/proc/clear_sixsixsix_laws() - devil_laws.Cut() - sorted_laws.Cut() - /datum/ai_laws/proc/clear_ion_laws() ion_laws.Cut() sorted_laws.Cut() @@ -255,7 +224,7 @@ supplied_laws.Cut() sorted_laws.Cut() -/datum/ai_laws/proc/show_laws(var/who) +/datum/ai_laws/proc/show_laws(who) sort_laws() for(var/datum/ai_law/law in sorted_laws) if(law == zeroth_law_borg) @@ -271,25 +240,25 @@ /******** * Get * ********/ -/datum/ai_laws/proc/get_state_law(var/datum/ai_law/law) +/datum/ai_laws/proc/get_state_law(datum/ai_law/law) return law.get_state_law(src) -/datum/ai_law/proc/get_state_law(var/datum/ai_laws/laws) +/datum/ai_law/proc/get_state_law(datum/ai_laws/laws) -/datum/ai_law/zero/get_state_law(var/datum/ai_laws/laws) +/datum/ai_law/zero/get_state_law(datum/ai_laws/laws) if(src == laws.zeroth_law) return laws.state_zeroth -/datum/ai_law/ion/get_state_law(var/datum/ai_laws/laws) +/datum/ai_law/ion/get_state_law(datum/ai_laws/laws) return laws.get_state_internal(laws.ion_laws, laws.state_ion, src) -/datum/ai_law/inherent/get_state_law(var/datum/ai_laws/laws) +/datum/ai_law/inherent/get_state_law(datum/ai_laws/laws) return laws.get_state_internal(laws.inherent_laws, laws.state_inherent, src) -/datum/ai_law/supplied/get_state_law(var/datum/ai_laws/laws) +/datum/ai_law/supplied/get_state_law(datum/ai_laws/laws) return laws.get_state_internal(laws.supplied_laws, laws.state_supplied, src) -/datum/ai_laws/proc/get_state_internal(var/list/datum/ai_law/laws, var/list/state, var/list/datum/ai_law/law) +/datum/ai_laws/proc/get_state_internal(list/datum/ai_law/laws, list/state, list/datum/ai_law/law) var/index = laws.Find(law) if(index) return state[index] @@ -298,25 +267,25 @@ /******** * Set * ********/ -/datum/ai_laws/proc/set_state_law(var/datum/ai_law/law, var/state) +/datum/ai_laws/proc/set_state_law(datum/ai_law/law, state) law.set_state_law(src, state) -/datum/ai_law/proc/set_state_law(var/datum/ai_law/law, var/state) +/datum/ai_law/proc/set_state_law(datum/ai_law/law, state) -/datum/ai_law/zero/set_state_law(var/datum/ai_laws/laws, var/state) +/datum/ai_law/zero/set_state_law(datum/ai_laws/laws, state) if(src == laws.zeroth_law) laws.state_zeroth = state -/datum/ai_law/ion/set_state_law(var/datum/ai_laws/laws, var/state) +/datum/ai_law/ion/set_state_law(datum/ai_laws/laws, state) laws.set_state_law_internal(laws.ion_laws, laws.state_ion, src, state) -/datum/ai_law/inherent/set_state_law(var/datum/ai_laws/laws, var/state) +/datum/ai_law/inherent/set_state_law(datum/ai_laws/laws, state) laws.set_state_law_internal(laws.inherent_laws, laws.state_inherent, src, state) -/datum/ai_law/supplied/set_state_law(var/datum/ai_laws/laws, var/state) +/datum/ai_law/supplied/set_state_law(datum/ai_laws/laws, state) laws.set_state_law_internal(laws.supplied_laws, laws.state_supplied, src, state) -/datum/ai_laws/proc/set_state_law_internal(var/list/datum/ai_law/laws, var/list/state, var/list/datum/ai_law/law, var/do_state) +/datum/ai_laws/proc/set_state_law_internal(list/datum/ai_law/laws, list/state, list/datum/ai_law/law, do_state) var/index = laws.Find(law) if(index) state[index] = do_state diff --git a/code/datums/browser.dm b/code/datums/browser.dm index 76be0b02a12..1e7f95b5780 100644 --- a/code/datums/browser.dm +++ b/code/datums/browser.dm @@ -16,7 +16,7 @@ var/title_buttons = "" -/datum/browser/New(nuser, nwindow_id, ntitle = 0, nwidth = 0, nheight = 0, var/atom/nref = null) +/datum/browser/New(nuser, nwindow_id, ntitle = 0, nwidth = 0, nheight = 0, atom/nref = null) user = nuser window_id = nwindow_id @@ -101,7 +101,7 @@ [get_footer()] "} -/datum/browser/proc/open(var/use_onclose = 1) +/datum/browser/proc/open(use_onclose = 1) var/window_size = "" if(width && height) window_size = "size=[width]x[height];" @@ -145,7 +145,7 @@ // Otherwise, the user mob's machine var will be reset directly. // -/proc/onclose(mob/user, windowid, var/atom/ref=null) +/proc/onclose(mob/user, windowid, atom/ref=null) if(!user || !user.client) return var/param = "null" if(ref) @@ -161,7 +161,7 @@ // if a valid atom reference is supplied, call the atom's Topic() with "close=1" // otherwise, just reset the client mob's machine var. // -/client/verb/windowclose(var/atomref as text) +/client/verb/windowclose(atomref as text) set hidden = 1 // hide this verb from the user's panel set name = ".windowclose" // no autocomplete on cmd line diff --git a/code/datums/cache/powermonitor.dm b/code/datums/cache/powermonitor.dm index a11e9b76a41..31195303f3f 100644 --- a/code/datums/cache/powermonitor.dm +++ b/code/datums/cache/powermonitor.dm @@ -1,6 +1,6 @@ GLOBAL_DATUM_INIT(powermonitor_repository, /datum/repository/powermonitor, new()) -/datum/repository/powermonitor/proc/powermonitor_data(var/refresh = 0) +/datum/repository/powermonitor/proc/powermonitor_data(refresh = 0) var/pMonData[0] var/datum/cache_entry/cache_entry = cache_data diff --git a/code/datums/components/decal.dm b/code/datums/components/decal.dm index 876cf0c0507..ba5864ad0eb 100644 --- a/code/datums/components/decal.dm +++ b/code/datums/components/decal.dm @@ -71,5 +71,5 @@ if(strength >= cleanable) qdel(src) -/datum/component/decal/proc/examine(datum/source, mob/user, var/list/examine_list) +/datum/component/decal/proc/examine(datum/source, mob/user, list/examine_list) examine_list += description diff --git a/code/datums/components/material_container.dm b/code/datums/components/material_container.dm index 5371384e781..38ee8ed6042 100644 --- a/code/datums/components/material_container.dm +++ b/code/datums/components/material_container.dm @@ -205,7 +205,7 @@ return amt return FALSE -/datum/component/material_container/proc/transer_amt_to(var/datum/component/material_container/T, amt, id) +/datum/component/material_container/proc/transer_amt_to(datum/component/material_container/T, amt, id) if((amt==0)||(!T)||(!id)) return FALSE if(amt<0) diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index ccd0b4c66e5..b258a18b94c 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -345,7 +345,7 @@ GLOBAL_VAR_INIT(record_id_num, 1001) locked += L return -/proc/get_id_photo(mob/living/carbon/human/H, var/custom_job = null) +/proc/get_id_photo(mob/living/carbon/human/H, custom_job = null) var/icon/preview_icon = null var/obj/item/organ/external/head/head_organ = H.get_organ("head") var/obj/item/organ/internal/eyes/eyes_organ = H.get_int_organ(/obj/item/organ/internal/eyes) diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index dc6101630bf..675b59b965c 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -445,7 +445,7 @@ usr << browse(html, "window=variables[refid];size=475x650") #define VV_HTML_ENCODE(thing) ( sanitize ? html_encode(thing) : thing ) -/proc/debug_variable(name, value, level, var/datum/DA = null, sanitize = TRUE) +/proc/debug_variable(name, value, level, datum/DA = null, sanitize = TRUE) var/header if(DA) if(islist(DA)) diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm index f167df70dac..132ddf6ff66 100644 --- a/code/datums/diseases/advance/advance.dm +++ b/code/datums/diseases/advance/advance.dm @@ -44,7 +44,7 @@ GLOBAL_LIST_INIT(advance_cures, list( */ -/datum/disease/advance/New(var/process = 1, var/datum/disease/advance/D) +/datum/disease/advance/New(process = 1, datum/disease/advance/D) if(!istype(D)) D = null // Generate symptoms if we weren't given any. @@ -317,7 +317,7 @@ GLOBAL_LIST_INIT(advance_cures, list( */ // Mix a list of advance diseases and return the mixed result. -/proc/Advance_Mix(var/list/D_list) +/proc/Advance_Mix(list/D_list) // to_chat(world, "Mixing!!!!") diff --git a/code/datums/diseases/advance/presets.dm b/code/datums/diseases/advance/presets.dm index c1df095f9c2..0cf111358c9 100644 --- a/code/datums/diseases/advance/presets.dm +++ b/code/datums/diseases/advance/presets.dm @@ -1,6 +1,6 @@ // Cold -/datum/disease/advance/cold/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0) +/datum/disease/advance/cold/New(process = 1, datum/disease/advance/D, copy = 0) if(!D) name = "Cold" symptoms = list(new/datum/symptom/sneeze) @@ -9,7 +9,7 @@ // Flu -/datum/disease/advance/flu/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0) +/datum/disease/advance/flu/New(process = 1, datum/disease/advance/D, copy = 0) if(!D) name = "Flu" symptoms = list(new/datum/symptom/cough) @@ -18,7 +18,7 @@ // Voice Changing -/datum/disease/advance/voice_change/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0) +/datum/disease/advance/voice_change/New(process = 1, datum/disease/advance/D, copy = 0) if(!D) name = "Epiglottis Mutation" symptoms = list(new/datum/symptom/voice_change) @@ -27,7 +27,7 @@ // Toxin Filter -/datum/disease/advance/heal/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0) +/datum/disease/advance/heal/New(process = 1, datum/disease/advance/D, copy = 0) if(!D) name = "Liver Enhancer" symptoms = list(new/datum/symptom/heal) @@ -36,7 +36,7 @@ // Hullucigen -/datum/disease/advance/hullucigen/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0) +/datum/disease/advance/hullucigen/New(process = 1, datum/disease/advance/D, copy = 0) if(!D) name = "Reality Impairment" symptoms = list(new/datum/symptom/hallucigen) @@ -44,7 +44,7 @@ // Sensory Restoration -/datum/disease/advance/sensory_restoration/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0) +/datum/disease/advance/sensory_restoration/New(process = 1, datum/disease/advance/D, copy = 0) if(!D) name = "Reality Enhancer" symptoms = list(new/datum/symptom/sensory_restoration) diff --git a/code/datums/diseases/advance/symptoms/shedding.dm b/code/datums/diseases/advance/symptoms/shedding.dm index c3a64501759..087231017b4 100644 --- a/code/datums/diseases/advance/symptoms/shedding.dm +++ b/code/datums/diseases/advance/symptoms/shedding.dm @@ -36,15 +36,18 @@ BONUS if(3, 4) if(!(head_organ.h_style == "Bald") && !(head_organ.h_style == "Balding Hair")) to_chat(H, "Your hair starts to fall out in clumps...") - spawn(50) - head_organ.h_style = "Balding Hair" - H.update_hair() + addtimer(CALLBACK(src, .proc/change_hair, H, head_organ, null, "Balding Hair"), 5 SECONDS) if(5) if(!(head_organ.f_style == "Shaved") || !(head_organ.h_style == "Bald")) to_chat(H, "Your hair starts to fall out in clumps...") - spawn(50) - head_organ.f_style = "Shaved" - head_organ.h_style = "Bald" - H.update_hair() - H.update_fhair() - return + addtimer(CALLBACK(src, .proc/change_hair, H, head_organ, "Shaved", "Bald"), 5 SECONDS) + +/datum/symptom/shedding/proc/change_hair(mob/living/carbon/human/H, obj/item/organ/external/head/head_organ, f_style, h_style) + if(!H || !head_organ) + return + if(f_style) + head_organ.f_style = f_style + H.update_fhair() + if(h_style) + head_organ.h_style = h_style + H.update_hair() diff --git a/code/datums/dog_fashion.dm b/code/datums/dog_fashion.dm index ef3b76652ea..6c43f7c9ead 100644 --- a/code/datums/dog_fashion.dm +++ b/code/datums/dog_fashion.dm @@ -31,7 +31,7 @@ if(speak_emote) D.speak_emote = speak_emote -/datum/dog_fashion/proc/get_overlay(var/dir) +/datum/dog_fashion/proc/get_overlay(dir) if(icon_file && obj_icon_state) var/image/corgI = image(icon_file, obj_icon_state, dir = dir) corgI.alpha = obj_alpha diff --git a/code/datums/helper_datums/construction_datum.dm b/code/datums/helper_datums/construction_datum.dm index 8eefe5efa0d..155bbaed8dc 100644 --- a/code/datums/helper_datums/construction_datum.dm +++ b/code/datums/helper_datums/construction_datum.dm @@ -217,7 +217,7 @@ text = replacetext(text,"{HOLDER}","[holder]") return text -/datum/construction/reversible2/custom_action(index, diff, used_atom, var/mob/user) +/datum/construction/reversible2/custom_action(index, diff, used_atom, mob/user) if(!..(index,used_atom,user)) return 0 diff --git a/code/datums/helper_datums/input.dm b/code/datums/helper_datums/input.dm index 4c3dc6a1cf4..175a730b275 100644 --- a/code/datums/helper_datums/input.dm +++ b/code/datums/helper_datums/input.dm @@ -45,7 +45,7 @@ return result // Callback function should take the result as the last argument -/datum/async_input/proc/on_close(var/datum/callback/cb) +/datum/async_input/proc/on_close(datum/callback/cb) onCloseCb = cb /datum/async_input/proc/show() diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm index 4609075ddd7..49c38103d56 100644 --- a/code/datums/helper_datums/teleport.dm +++ b/code/datums/helper_datums/teleport.dm @@ -84,14 +84,12 @@ /datum/teleport/proc/playSpecials(atom/location,datum/effect_system/effect,sound) if(location) if(effect) - spawn(-1) - src = null - effect.attach(location) - effect.start() + src = null + effect.attach(location) + effect.start() if(sound) - spawn(-1) - src = null - playsound(location,sound,60,1) + src = null + playsound(location,sound,60,1) return //do the monkey dance diff --git a/code/datums/hud.dm b/code/datums/hud.dm index 50152c4873d..60fbb9c8194 100644 --- a/code/datums/hud.dm +++ b/code/datums/hud.dm @@ -21,7 +21,6 @@ GLOBAL_LIST_INIT(huds, list( \ ANTAG_HUD_VAMPIRE = new/datum/atom_hud/antag/hidden(),\ ANTAG_HUD_ABDUCTOR = new/datum/atom_hud/antag/hidden(),\ DATA_HUD_ABDUCTOR = new/datum/atom_hud/abductor(),\ - ANTAG_HUD_DEVIL = new/datum/atom_hud/antag/hidden(),\ ANTAG_HUD_EVENTMISC = new/datum/atom_hud/antag/hidden(),\ ANTAG_HUD_BLOB = new/datum/atom_hud/antag/hidden()\ )) diff --git a/code/datums/log_record.dm b/code/datums/log_record.dm index 2a659477b47..cf437c86dbd 100644 --- a/code/datums/log_record.dm +++ b/code/datums/log_record.dm @@ -37,7 +37,7 @@ else . = subject -/datum/log_record/proc/get_health_string(var/mob/living/L) +/datum/log_record/proc/get_health_string(mob/living/L) var/OX = L.getOxyLoss() > 50 ? "[L.getOxyLoss()]" : L.getOxyLoss() var/TX = L.getToxLoss() > 50 ? "[L.getToxLoss()]" : L.getToxLoss() var/BU = L.getFireLoss() > 50 ? "[L.getFireLoss()]" : L.getFireLoss() diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 591a487598e..35e0053822d 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -55,10 +55,6 @@ var/antag_hud_icon_state = null //this mind's ANTAG_HUD should have this icon_state var/datum/atom_hud/antag/antag_hud = null //this mind's antag HUD var/datum/mindslaves/som //stands for slave or master...hush.. - var/datum/devilinfo/devilinfo //Information about the devil, if any. - var/damnation_type = 0 - var/datum/mind/soulOwner //who owns the soul. Under normal circumstances, this will point to src - var/hasSoul = TRUE var/isholy = FALSE // is this person a chaplain or admin role allowed to use bibles var/isblessed = FALSE // is this person blessed by a chaplain? @@ -76,7 +72,6 @@ /datum/mind/New(new_key) key = new_key - soulOwner = src /datum/mind/Destroy() SSticker.minds -= src @@ -88,7 +83,6 @@ antag_datums = null current = null original = null - soulOwner = null return ..() /datum/mind/proc/transfer_to(mob/living/new_character) @@ -314,22 +308,6 @@ . += _memory_edit_role_enabled(ROLE_ABDUCTOR) -/datum/mind/proc/memory_edit_devil(mob/living/H) - . = _memory_edit_header("devil", list("devilagents")) - if(src in SSticker.mode.devils) - if(!devilinfo) - . += "No devilinfo found! Yell at a coder!" - else if(!devilinfo.ascendable) - . += "DEVIL|Ascendable Devil|sintouched|no" - else - . += "DEVIL|ASCENDABLE DEVIL|sintouched|no" - else if(src in SSticker.mode.sintouched) - . += "devil|Ascendable Devil|SINTOUCHED|no" - else - . += "devil|Ascendable Devil|sintouched|NO" - - . += _memory_edit_role_enabled(ROLE_DEVIL) - /datum/mind/proc/memory_edit_eventmisc(mob/living/H) . = _memory_edit_header("event", list()) if(src in SSticker.mode.eventmiscs) @@ -461,10 +439,6 @@ sections["shadowling"] = memory_edit_shadowling(H) /** Abductors **/ sections["abductor"] = memory_edit_abductor(H) - /** DEVIL ***/ - var/static/list/devils_typecache = typecacheof(list(/mob/living/carbon/human, /mob/living/carbon/true_devil, /mob/living/silicon/robot)) - if(is_type_in_typecache(current, devils_typecache)) - sections["devil"] = memory_edit_devil(H) sections["eventmisc"] = memory_edit_eventmisc(H) /** TRAITOR ***/ sections["traitor"] = memory_edit_traitor() @@ -1104,76 +1078,6 @@ SSticker.mode.update_eventmisc_icons_added(src) message_admins("[key_name_admin(usr)] has eventantag'ed [current].") log_admin("[key_name(usr)] has eventantag'ed [current].") - else if(href_list["devil"]) - switch(href_list["devil"]) - if("clear") - if(src in SSticker.mode.devils) - if(istype(current,/mob/living/carbon/true_devil/)) - to_chat(usr,"This cannot be used on true or arch-devils.") - else - SSticker.mode.devils -= src - SSticker.mode.update_devil_icons_removed(src) - special_role = null - to_chat(current,"Your infernal link has been severed! You are no longer a devil!") - RemoveSpell(/obj/effect/proc_holder/spell/targeted/infernal_jaunt) - RemoveSpell(/obj/effect/proc_holder/spell/targeted/click/fireball/hellish) - RemoveSpell(/obj/effect/proc_holder/spell/targeted/click/summon_contract) - RemoveSpell(/obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork) - RemoveSpell(/obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork/greater) - RemoveSpell(/obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork/ascended) - RemoveSpell(/obj/effect/proc_holder/spell/targeted/conjure_item/violin) - RemoveSpell(/obj/effect/proc_holder/spell/targeted/summon_dancefloor) - RemoveSpell(/obj/effect/proc_holder/spell/targeted/sintouch) - RemoveSpell(/obj/effect/proc_holder/spell/targeted/sintouch/ascended) - message_admins("[key_name_admin(usr)] has de-devil'ed [current].") - if(issilicon(current)) - var/mob/living/silicon/S = current - S.laws.clear_sixsixsix_laws() - devilinfo = null - log_admin("[key_name(usr)] has de-devil'ed [current].") - else if(src in SSticker.mode.sintouched) - SSticker.mode.sintouched -= src - message_admins("[key_name_admin(usr)] has de-sintouch'ed [current].") - log_admin("[key_name(usr)] has de-sintouch'ed [current].") - if("devil") - if(devilinfo) - devilinfo.ascendable = FALSE - message_admins("[key_name_admin(usr)] has made [current] unable to ascend as a devil.") - log_admin("[key_name_admin(usr)] has made [current] unable to ascend as a devil.") - return - if(!ishuman(current) && !isrobot(current)) - to_chat(usr, "This only works on humans and cyborgs!") - return - SSticker.mode.devils += src - special_role = "devil" - SSticker.mode.update_devil_icons_added(src) - SSticker.mode.finalize_devil(src, FALSE) - SSticker.mode.forge_devil_objectives(src, 2) - SSticker.mode.greet_devil(src) - message_admins("[key_name_admin(usr)] has devil'ed [current].") - log_admin("[key_name(usr)] has devil'ed [current].") - if("ascendable_devil") - if(devilinfo) - devilinfo.ascendable = TRUE - message_admins("[key_name_admin(usr)] has made [current] able to ascend as a devil.") - log_admin("[key_name_admin(usr)] has made [current] able to ascend as a devil.") - return - if(!ishuman(current) && !isrobot(current)) - to_chat(usr, "This only works on humans and cyborgs!") - return - SSticker.mode.devils += src - special_role = "devil" - SSticker.mode.update_devil_icons_added(src) - SSticker.mode.finalize_devil(src, TRUE) - SSticker.mode.forge_devil_objectives(src, 2) - SSticker.mode.greet_devil(src) - message_admins("[key_name_admin(usr)] has devil'ed [current]. The devil has been marked as ascendable.") - log_admin("[key_name(usr)] has devil'ed [current]. The devil has been marked as ascendable.") - if("sintouched") - var/mob/living/carbon/human/H = current - H.influenceSin() - message_admins("[key_name_admin(usr)] has sintouch'ed [current].") - log_admin("[key_name(usr)] has sintouch'ed [current].") else if(href_list["traitor"]) switch(href_list["traitor"]) @@ -1805,17 +1709,6 @@ var/obj/effect/proc_holder/spell/S = X S.action.Grant(new_character) -/datum/mind/proc/disrupt_spells(delay, list/exceptions = New()) - for(var/X in spell_list) - var/obj/effect/proc_holder/spell/S = X - for(var/type in exceptions) - if(istype(S, type)) - continue - S.charge_counter = delay - spawn(0) - S.start_recharge() - S.updateButtonIcon() - /datum/mind/proc/get_ghost(even_if_they_cant_reenter) for(var/mob/dead/observer/G in GLOB.dead_mob_list) if(G.mind == src) @@ -1891,18 +1784,6 @@ to_chat(current, "You seem to have forgotten the events of the past 10 minutes or so, and your head aches a bit as if someone beat it savagely with a stick.") to_chat(current, "This means you don't remember who you were working for or what you were doing.") -/datum/mind/proc/is_revivable() //Note, this ONLY checks the mind. - if(damnation_type) - return FALSE - return TRUE - -// returns a mob to message to produce something visible for the target mind -/datum/mind/proc/messageable_mob() - if(!QDELETED(current) && current.client) - return current - else - return get_ghost(even_if_they_cant_reenter = TRUE) - //Initialisation procs /mob/proc/mind_initialize() if(mind) diff --git a/code/datums/pipe_datums.dm b/code/datums/pipe_datums.dm index 8d3b0807f9c..8fd243850b3 100644 --- a/code/datums/pipe_datums.dm +++ b/code/datums/pipe_datums.dm @@ -370,13 +370,13 @@ GLOBAL_LIST_EMPTY(rpd_pipe_list) //Some pipes we don't want to be dispensable pipe_id = PIPE_DISPOSALS_JUNCTION_LEFT pipe_icon = "pipe-j2" -/proc/get_pipe_name(var/pipe_id, var/pipe_type) +/proc/get_pipe_name(pipe_id, pipe_type) for(var/datum/pipes/P in GLOB.construction_pipe_list) if(P.pipe_id == pipe_id && P.pipe_type == pipe_type) return P.pipe_name return "unknown pipe" -/proc/get_pipe_icon(var/pipe_id) +/proc/get_pipe_icon(pipe_id) for(var/datum/pipes/P in GLOB.construction_pipe_list) if(P.pipe_id == pipe_id) return P.pipe_icon diff --git a/code/datums/radio.dm b/code/datums/radio.dm index efeebc7c973..79890350f20 100644 --- a/code/datums/radio.dm +++ b/code/datums/radio.dm @@ -3,7 +3,7 @@ var/frequency as num var/list/obj/devices = list() -/datum/radio_frequency/proc/post_signal(obj/source as obj|null, datum/signal/signal, var/filter = null as text|null, var/range = null as num|null) +/datum/radio_frequency/proc/post_signal(obj/source as obj|null, datum/signal/signal, filter = null as text|null, range = null as num|null) var/turf/start_point if(range) start_point = get_turf(source) @@ -19,7 +19,7 @@ send_to_filter(source, signal, next_filter, start_point, range) //Sends a signal to all machines belonging to a given filter. Should be called by post_signal() -/datum/radio_frequency/proc/send_to_filter(obj/source, datum/signal/signal, var/filter, var/turf/start_point = null, var/range = null) +/datum/radio_frequency/proc/send_to_filter(obj/source, datum/signal/signal, filter, turf/start_point = null, range = null) if(range && !start_point) return @@ -35,7 +35,7 @@ device.receive_signal(signal, TRANSMISSION_RADIO, frequency) -/datum/radio_frequency/proc/add_listener(obj/device as obj, var/filter as text|null) +/datum/radio_frequency/proc/add_listener(obj/device as obj, filter as text|null) if(!filter) filter = RADIO_DEFAULT //log_admin("add_listener(device=[device],filter=[filter]) frequency=[frequency]") diff --git a/code/datums/soullink.dm b/code/datums/soullink.dm deleted file mode 100644 index f5727f1d0d0..00000000000 --- a/code/datums/soullink.dm +++ /dev/null @@ -1,166 +0,0 @@ -/mob/living - var/list/ownedSoullinks //soullinks we are the owner of - var/list/sharedSoullinks //soullinks we are a/the sharer of - -/mob/living/Destroy() - for(var/s in ownedSoullinks) - var/datum/soullink/S = s - S.ownerDies(FALSE) - qdel(s) //If the owner is destroy()'d, the soullink is destroy()'d - ownedSoullinks = null - for(var/s in sharedSoullinks) - var/datum/soullink/S = s - S.sharerDies(FALSE) - S.removeSoulsharer(src) //If a sharer is destroy()'d, they are simply removed - sharedSoullinks = null - return ..() - -//Keeps track of a Mob->Mob (potentially Player->Player) connection -//Can be used to trigger actions on one party when events happen to another -//Eg: shared deaths -//Can be used to form a linked list of mob-hopping -//Does NOT transfer with minds -/datum/soullink - var/mob/living/soulowner - var/mob/living/soulsharer - var/id //Optional ID, for tagging and finding specific instances - -/datum/soullink/Destroy() - if(soulowner) - LAZYREMOVE(soulowner.ownedSoullinks, src) - soulowner = null - if(soulsharer) - LAZYREMOVE(soulsharer.sharedSoullinks, src) - soulsharer = null - return ..() - -/datum/soullink/proc/removeSoulsharer(mob/living/sharer) - if(soulsharer == sharer) - soulsharer = null - LAZYREMOVE(sharer.sharedSoullinks, src) - -//Used to assign variables, called primarily by soullink() -//Override this to create more unique soullinks (Eg: 1->Many relationships) -//Return TRUE/FALSE to return the soullink/null in soullink() -/datum/soullink/proc/parseArgs(mob/living/owner, mob/living/sharer) - if(!owner || !sharer) - return FALSE - soulowner = owner - soulsharer = sharer - LAZYADD(owner.ownedSoullinks, src) - LAZYADD(sharer.sharedSoullinks, src) - return TRUE - -//Runs after /living death() -//Override this for content -/datum/soullink/proc/ownerDies(gibbed, mob/living/owner) - -//Runs after /living death() -//Override this for content -/datum/soullink/proc/sharerDies(gibbed, mob/living/owner) - -//Runs after /living update_revive() -//Override this for content -/datum/soullink/proc/ownerRevives(mob/living/owner) - -//Runs after /living update_revive() -//Override this for content -/datum/soullink/proc/sharerRevives(mob/living/owner) - -//Quick-use helper -/proc/soullink(typepath, ...) - var/datum/soullink/S = new typepath() - if(S.parseArgs(arglist(args.Copy(2, 0)))) - return S - - - -///////////////// -// MULTISHARER // -///////////////// -//Abstract soullink for use with 1 Owner -> Many Sharer setups -/datum/soullink/multisharer - var/list/soulsharers - -/datum/soullink/multisharer/parseArgs(mob/living/owner, list/sharers) - if(!owner || !LAZYLEN(sharers)) - return FALSE - soulowner = owner - soulsharers = sharers - LAZYADD(owner.ownedSoullinks, src) - for(var/l in sharers) - var/mob/living/L = l - LAZYADD(L.sharedSoullinks, src) - return TRUE - -/datum/soullink/multisharer/removeSoulsharer(mob/living/sharer) - LAZYREMOVE(soulsharers, sharer) - - - -///////////////// -// SHARED FATE // -///////////////// -//When the soulowner dies, the soulsharer dies, and vice versa -//This is intended for two players(or AI) and two mobs - -/datum/soullink/sharedfate/ownerDies(gibbed, mob/living/owner) - if(soulsharer) - soulsharer.death(gibbed) - -/datum/soullink/sharedfate/sharerDies(gibbed, mob/living/sharer) - if(soulowner) - soulowner.death(gibbed) - -///////////////// -// Demon Bind // -///////////////// -//When the soulowner dies, the soulsharer dies, but NOT vice versa -//This is intended for two players(or AI) and two mobs - -/datum/soullink/oneway/ownerDies(gibbed, mob/living/owner) - if(soulsharer) - soulsharer.dust(FALSE) - -/datum/soullink/oneway/devilfriend - -///////////////// -// SHARED BODY // -///////////////// -//When the soulsharer dies, they're placed in the soulowner, who remains alive -//If the soulowner dies, the soulsharer is killed and placed into the soulowner (who is still dying) -//This one is intended for one player moving between many mobs - -/datum/soullink/sharedbody/ownerDies(gibbed, mob/living/owner) - if(soulowner && soulsharer) - if(soulsharer.mind) - soulsharer.mind.transfer_to(soulowner) - soulsharer.death(gibbed) - -/datum/soullink/sharedbody/sharerDies(gibbed, mob/living/sharer) - if(soulowner && soulsharer && soulsharer.mind) - soulsharer.mind.transfer_to(soulowner) - - - -////////////////////// -// REPLACEMENT POOL // -////////////////////// -//When the owner dies, one of the sharers is placed in the owner's body, fully healed -//Sort of a "winner-stays-on" soullink -//Gibbing ends it immediately - -/datum/soullink/multisharer/replacementpool/ownerDies(gibbed, mob/living/owner) - if(LAZYLEN(soulsharers) && !gibbed) //let's not put them in some gibs - var/list/souls = shuffle(soulsharers.Copy()) - for(var/l in souls) - var/mob/living/L = l - if(L.stat != DEAD && L.mind) - L.mind.transfer_to(soulowner) - soulowner.revive(TRUE, TRUE) - L.death(FALSE) - -//Lose your claim to the throne! -/datum/soullink/multisharer/replacementpool/sharerDies(gibbed, mob/living/sharer) - removeSoulsharer(sharer) - diff --git a/code/datums/spell.dm b/code/datums/spell.dm index d530c074a78..db668cd609a 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -38,7 +38,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) spell.remove_ranged_ability(spell.ranged_ability_user) return ..() -/obj/effect/proc_holder/proc/add_ranged_ability(mob/user, var/msg) +/obj/effect/proc_holder/proc/add_ranged_ability(mob/user, msg) if(!user || !user.client) return if(user.ranged_ability && user.ranged_ability != src) @@ -61,7 +61,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) if(C && ranged_mousepointer && C.mouse_pointer_icon == ranged_mousepointer) C.mouse_pointer_icon = initial(C.mouse_pointer_icon) -/obj/effect/proc_holder/proc/remove_ranged_ability(mob/user, var/msg) +/obj/effect/proc_holder/proc/remove_ranged_ability(mob/user, msg) if(!user || (user.ranged_ability && user.ranged_ability != src)) //To avoid removing the wrong ability return user.ranged_ability = null diff --git a/code/datums/spells/conjure.dm b/code/datums/spells/conjure.dm index 4c15353e6c4..be716536aff 100644 --- a/code/datums/spells/conjure.dm +++ b/code/datums/spells/conjure.dm @@ -44,9 +44,7 @@ summoned_object.admin_spawned = TRUE if(summon_lifespan) - spawn(summon_lifespan) - if(summoned_object) - qdel(summoned_object) + QDEL_IN(summoned_object, summon_lifespan) else switch(charge_type) if("recharge") diff --git a/code/datums/spells/devil.dm b/code/datums/spells/devil.dm deleted file mode 100644 index f9e075bdf81..00000000000 --- a/code/datums/spells/devil.dm +++ /dev/null @@ -1,248 +0,0 @@ -/obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork - name = "Summon Pitchfork" - desc = "A devil's weapon of choice. Use this to summon/unsummon your pitchfork." - item_type = /obj/item/twohanded/pitchfork/demonic - action_icon_state = "pitchfork" - action_background_icon_state = "bg_demon" - -/obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork/greater - item_type = /obj/item/twohanded/pitchfork/demonic/greater - -/obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork/ascended - item_type = /obj/item/twohanded/pitchfork/demonic/ascended - -/obj/effect/proc_holder/spell/targeted/conjure_item/violin - item_type = /obj/item/instrument/violin/golden - desc = "A devil's instrument of choice. Use this to summon/unsummon your golden violin." - invocation_type = "whisper" - invocation = "I ain't have this much fun since Georgia." - action_icon_state = "golden_violin" - name = "Summon golden violin" - action_background_icon_state = "bg_demon" - - -/obj/effect/proc_holder/spell/targeted/click/summon_contract - name = "Summon infernal contract" - desc = "Skip making a contract by hand, just do it by magic." - invocation_type = "whisper" - invocation = "Just sign on the dotted line." - selection_activated_message = "You prepare a detailed contract. Click on a target to summon the contract in his hands." - selection_deactivated_message = "You archive the contract for later use." - include_user = FALSE - range = 5 - auto_target_single = FALSE // Prevent an accidental contract from summoning - click_radius = -1 // Precision clicking required - allowed_type = /mob/living/carbon - clothes_req = FALSE - school = "conjuration" - charge_max = 150 - cooldown_min = 10 - action_icon_state = "spell_default" - action_background_icon_state = "bg_demon" - -/obj/effect/proc_holder/spell/targeted/click/summon_contract/cast(list/targets, mob/user = usr) - for(var/target in targets) - var/mob/living/carbon/C = target - if(C.mind && user.mind) - if(C.stat == DEAD) - if(user.drop_item()) - var/obj/item/paper/contract/infernal/revive/contract = new(user.loc, C.mind, user.mind) - user.put_in_hands(contract) - else - var/obj/item/paper/contract/infernal/contract - var/contractTypeName = input(user, "What type of contract?") in list (CONTRACT_POWER, CONTRACT_WEALTH, CONTRACT_PRESTIGE, CONTRACT_MAGIC, CONTRACT_KNOWLEDGE, CONTRACT_FRIENDSHIP) //TODO: Refactor this to be less boilerplate-y - switch(contractTypeName) - if(CONTRACT_POWER) - contract = new /obj/item/paper/contract/infernal/power(C.loc, C.mind, user.mind) - if(CONTRACT_WEALTH) - contract = new /obj/item/paper/contract/infernal/wealth(C.loc, C.mind, user.mind) - if(CONTRACT_PRESTIGE) - contract = new /obj/item/paper/contract/infernal/prestige(C.loc, C.mind, user.mind) - if(CONTRACT_MAGIC) - contract = new /obj/item/paper/contract/infernal/magic(C.loc, C.mind, user.mind) - if(CONTRACT_KNOWLEDGE) - contract = new /obj/item/paper/contract/infernal/knowledge(C.loc, C.mind, user.mind) - if(CONTRACT_FRIENDSHIP) - contract = new /obj/item/paper/contract/infernal/friendship(C.loc, C.mind, user.mind) - C.put_in_hands(contract) - else - to_chat(user,"[C] seems to not be sentient. You are unable to summon a contract for them.") - - -/obj/effect/proc_holder/spell/targeted/click/fireball/hellish - name = "Hellfire" - desc = "This spell launches hellfire at the target." - school = "evocation" - charge_max = 80 - clothes_req = FALSE - invocation = "Your very soul will catch fire!" - invocation_type = "shout" - fireball_type = /obj/item/projectile/magic/fireball/infernal - action_background_icon_state = "bg_demon" - -/obj/effect/proc_holder/spell/targeted/click/fireball/hellish/cast(list/targets, mob/living/user = usr) - add_attack_logs(user, targets, "has fired a Hellfire ball", ATKLOG_FEW) - .=..() - - -/obj/effect/proc_holder/spell/targeted/infernal_jaunt - name = "Infernal Jaunt" - desc = "Use hellfire to phase out of existence." - charge_max = 200 - clothes_req = FALSE - selection_type = "range" - range = -1 - cooldown_min = 0 - overlay = null - include_user = TRUE - action_icon_state = "jaunt" - action_background_icon_state = "bg_demon" - -/obj/effect/proc_holder/spell/targeted/infernal_jaunt/cast(list/targets, mob/living/user = usr) - if(istype(user)) - if(istype(user.loc, /obj/effect/dummy/slaughter)) - var/continuing = 0 - if(istype(get_area(user), /area/shuttle)) // Can always phase in in a shuttle. - continuing = TRUE - else - for(var/mob/living/C in orange(2, get_turf(user.loc))) //Can also phase in when nearby a potential buyer. - if (C.mind && C.mind.soulOwner == C.mind) - continuing = TRUE - break - if(continuing) - to_chat(user,"You are now phasing in.") - if(do_mob(user,user,150)) - user.infernalphasein() - else - to_chat(user,"You can only re-appear near a potential signer or on a shuttle.") - revert_cast() - return ..() - else - user.notransform = TRUE - user.fakefire() - to_chat(user,"You begin to phase back into sinful flames.") - if(do_mob(user,user,150)) - user.infernalphaseout() - else - to_chat(user,"You must remain still while exiting.") - user.ExtinguishMob() - start_recharge() - return - revert_cast() - - -/mob/living/proc/infernalphaseout() - dust_animation() - visible_message("[src] disappears in a flashfire!") - playsound(get_turf(src), 'sound/misc/enter_blood.ogg', 100, 1, -1) - var/obj/effect/dummy/slaughter/s_holder = new(loc) - ExtinguishMob() - forceMove(s_holder) - holder = s_holder - notransform = FALSE - fakefireextinguish() - -/mob/living/proc/infernalphasein() - if(notransform) - to_chat(src,"You're too busy to jaunt in.") - return 0 - fakefire() - forceMove(get_turf(src)) - visible_message("[src] appears in a firey blaze!") - playsound(get_turf(src), 'sound/misc/exit_blood.ogg', 100, 1, -1) - spawn(15) - fakefireextinguish(TRUE) - -/obj/effect/proc_holder/spell/targeted/sintouch - name = "Sin Touch" - desc = "Subtly encourage someone to sin." - charge_max = 1800 - clothes_req = FALSE - selection_type = "range" - range = 2 - cooldown_min = 0 - overlay = null - include_user = FALSE - action_icon_state = "sintouch" - action_background_icon_state = "bg_demon" - random_target = TRUE - random_target_priority = TARGET_RANDOM - max_targets = 3 - invocation = "TASTE SIN AND INDULGE!!" - invocation_type = "shout" - -/obj/effect/proc_holder/spell/targeted/sintouch/ascended - name = "Greater sin touch" - charge_max = 100 - range = 7 - max_targets = 10 - -/obj/effect/proc_holder/spell/targeted/sintouch/cast(list/targets, mob/living/user = usr) - for(var/mob/living/carbon/human/H in targets) - if(!H.mind) - continue - for(var/datum/objective/sintouched/A in H.mind.objectives) - continue - H.influenceSin() - H.Weaken(2) - H.Stun(2) - -/obj/effect/proc_holder/spell/targeted/summon_dancefloor - name = "Summon Dancefloor" - desc = "When what a Devil really needs is funk." - include_user = TRUE - range = -1 - clothes_req = FALSE - - school = "conjuration" - charge_max = 10 - cooldown_min = 50 //5 seconds, so the smoke can't be spammed - action_icon_state = "funk" - action_background_icon_state = "bg_demon" - - var/list/dancefloor_turfs - var/list/dancefloor_turfs_types - var/dancefloor_exists = FALSE -// var/datum/effect_system/smoke_spread/transparent/dancefloor_devil/smoke - - -/obj/effect/proc_holder/spell/targeted/summon_dancefloor/cast(list/targets, mob/user = usr) - LAZYINITLIST(dancefloor_turfs) - LAZYINITLIST(dancefloor_turfs_types) - -/* - if(!smoke) - smoke = new() - smoke.set_up(0, get_turf(user)) - smoke.start() -*/ - - if(dancefloor_exists) - dancefloor_exists = FALSE - for(var/i in 1 to dancefloor_turfs.len) - var/turf/T = dancefloor_turfs[i] - T.ChangeTurf(dancefloor_turfs_types[i]) - else - var/list/funky_turfs = RANGE_TURFS(1, user) - for(var/turf/T in funky_turfs) - if(T.density) - to_chat(user, "You're too close to a wall.") - return - dancefloor_exists = TRUE - var/i = 1 - dancefloor_turfs.len = funky_turfs.len - dancefloor_turfs_types.len = funky_turfs.len - for(var/t in funky_turfs) - var/turf/T = t - dancefloor_turfs[i] = T - dancefloor_turfs_types[i] = T.type - T.ChangeTurf((i % 2 == 0) ? /turf/simulated/floor/light/colour_cycle/dancefloor_a : /turf/simulated/floor/light/colour_cycle/dancefloor_b) - i++ - -/* -/datum/effect_system/smoke_spread/transparent/dancefloor_devil - effect_type = /obj/effect/particle_effect/smoke/transparent/dancefloor_devil - -/obj/effect/particle_effect/smoke/transparent/dancefloor_devil - lifetime = 2 -*/ diff --git a/code/datums/spells/devil_boons.dm b/code/datums/spells/devil_boons.dm deleted file mode 100644 index 5746fd9c2d2..00000000000 --- a/code/datums/spells/devil_boons.dm +++ /dev/null @@ -1,73 +0,0 @@ -/obj/effect/proc_holder/spell/targeted/summon_wealth - name = "Summon wealth" - desc = "The reward for selling your soul." - invocation_type = "none" - include_user = 1 - range = -1 - clothes_req = 0 - school = "conjuration" - charge_max = 100 - cooldown_min = 10 - action_icon_state = "moneybag" - - -/obj/effect/proc_holder/spell/targeted/summon_wealth/cast(list/targets, mob/user = usr) - for(var/mob/living/carbon/C in targets) - if(user.drop_item()) - var/obj/item = pick( - new /obj/item/coin/gold(user.loc), - new /obj/item/coin/diamond(user.loc), - new /obj/item/coin/silver(user.loc), - new /obj/item/stack/sheet/mineral/gold(user.loc), - new /obj/item/stack/sheet/mineral/silver(user.loc), - new /obj/item/stack/sheet/mineral/diamond(user.loc), - new /obj/item/stack/spacecash/c1000(user.loc)) - C.put_in_hands(item) - -/obj/effect/proc_holder/spell/targeted/view_range - name = "Distant vision" - desc = "The reward for selling your soul." - invocation_type = "none" - include_user = 1 - range = -1 - clothes_req = 0 - charge_max = 50 - cooldown_min = 10 - action_icon_state = "camera_jump" - var/ranges = list(7,8,9,10/*,11,12*/) - -/obj/effect/proc_holder/spell/targeted/view_range/cast(list/targets, mob/user = usr) - for(var/mob/C in targets) - if(!C.client) - continue - C.client.view = input("Select view range:", "Range", 4) in ranges - -/obj/effect/proc_holder/spell/targeted/summon_friend - name = "Summon Friend" - desc = "The reward for selling your soul." - invocation_type = "none" - include_user = 1 - range = -1 - clothes_req = 0 - charge_max = 50 - cooldown_min = 10 - action_icon_state = "sacredflame" - var/mob/living/friend - var/obj/effect/mob_spawn/human/demonic_friend/friendShell - -/obj/effect/proc_holder/spell/targeted/summon_friend/cast(list/targets, mob/user = usr) - if(!QDELETED(friend)) - to_chat(friend, "Your master has deemed you a poor friend. Your durance in hell will now resume.") - to_chat(user, "You banish your friend back to whence [friend.p_they()] came.") - friend.dust() - qdel(friendShell) - return - if(!QDELETED(friendShell)) - qdel(friendShell) - return - for(var/C in targets) - var/mob/living/L = C - friendShell = new /obj/effect/mob_spawn/human/demonic_friend(L.loc, L.mind, src) - -/obj/effect/proc_holder/spell/targeted/conjure_item/spellpacket/robeless - clothes_req = FALSE diff --git a/code/datums/spells/knock.dm b/code/datums/spells/knock.dm index e4c652ae1d3..072bbf244e2 100644 --- a/code/datums/spells/knock.dm +++ b/code/datums/spells/knock.dm @@ -16,19 +16,23 @@ /obj/effect/proc_holder/spell/aoe_turf/knock/cast(list/targets, mob/user = usr) for(var/turf/T in targets) for(var/obj/machinery/door/door in T.contents) - spawn(1) - if(istype(door,/obj/machinery/door/airlock/hatch/gamma)) - return - if(istype(door,/obj/machinery/door/airlock)) - var/obj/machinery/door/airlock/A = door - A.unlock(1) //forced because it's magic! - door.open() + INVOKE_ASYNC(src, .proc/try_open_airlock, door) for(var/obj/structure/closet/C in T.contents) - spawn(1) - if(istype(C, /obj/structure/closet/secure_closet)) - var/obj/structure/closet/secure_closet/SC = C - SC.locked = 0 - C.open() + INVOKE_ASYNC(src, .proc/try_open_closet, C) + +/obj/effect/proc_holder/spell/aoe_turf/knock/proc/try_open_airlock(obj/machinery/door/door) + if(istype(door, /obj/machinery/door/airlock/hatch/gamma)) + return + if(istype(door, /obj/machinery/door/airlock)) + var/obj/machinery/door/airlock/A = door + A.unlock(TRUE) //forced because it's magic! + door.open() + +/obj/effect/proc_holder/spell/aoe_turf/knock/proc/try_open_closet(obj/structure/closet/C) + if(istype(C, /obj/structure/closet/secure_closet)) + var/obj/structure/closet/secure_closet/SC = C + SC.locked = FALSE + C.open() /obj/effect/proc_holder/spell/aoe_turf/knock/greater name = "Greater Knock" diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index 6a25e22b985..3a856a8d130 100644 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -18,7 +18,7 @@ GLOBAL_LIST_INIT(all_supply_groups, list(SUPPLY_EMERGENCY,SUPPLY_SECURITY,SUPPLY_ENGINEER,SUPPLY_MEDICAL,SUPPLY_SCIENCE,SUPPLY_ORGANIC,SUPPLY_MATERIALS,SUPPLY_MISC,SUPPLY_VEND)) -/proc/get_supply_group_name(var/cat) +/proc/get_supply_group_name(cat) switch(cat) if(SUPPLY_EMERGENCY) return "Emergency" diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index b20fbc95869..c1970f116cc 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -1,6 +1,6 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) -/proc/get_uplink_items(var/job = null) +/proc/get_uplink_items(job = null) var/list/uplink_items = list() var/list/sales_items = list() var/newreference = 1 @@ -82,7 +82,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) var/refund_path = null // Alternative path for refunds, in case the item purchased isn't what is actually refunded (ie: holoparasites). var/refund_amount // specified refund amount in case there needs to be a TC penalty for refunds. -/datum/uplink_item/proc/spawn_item(var/turf/loc, var/obj/item/uplink/U) +/datum/uplink_item/proc/spawn_item(turf/loc, obj/item/uplink/U) if(hijack_only && !(usr.mind.special_role == SPECIAL_ROLE_NUKEOPS))//nukies get items that regular traitors only get with hijack. If a hijack-only item is not for nukies, then exclude it via the gamemode list. if(!(locate(/datum/objective/hijack) in usr.mind.objectives)) @@ -103,7 +103,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = replacetext(initial(temp.desc), "\n", "
") return desc -/datum/uplink_item/proc/buy(var/obj/item/uplink/hidden/U, var/mob/user) +/datum/uplink_item/proc/buy(obj/item/uplink/hidden/U, mob/user) if(!istype(U)) return 0 diff --git a/code/defines/procs/announce.dm b/code/defines/procs/announce.dm index a02ee54d6fa..b62f0f8763b 100644 --- a/code/defines/procs/announce.dm +++ b/code/defines/procs/announce.dm @@ -14,37 +14,37 @@ GLOBAL_DATUM_INIT(event_announcement, /datum/announcement/priority/command/event var/admin_announcement = 0 // Admin announcements are received regardless of being in range of a radio, unless you're in the lobby to prevent metagaming var/language = "Galactic Common" -/datum/announcement/New(var/do_log = 0, var/new_sound = null, var/do_newscast = 0) +/datum/announcement/New(do_log = 0, new_sound = null, do_newscast = 0) sound = new_sound log = do_log newscast = do_newscast -/datum/announcement/minor/New(var/do_log = 0, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0) +/datum/announcement/minor/New(do_log = 0, new_sound = sound('sound/misc/notice2.ogg'), do_newscast = 0) ..(do_log, new_sound, do_newscast) title = "Attention" announcement_type = "Minor Announcement" -/datum/announcement/priority/New(var/do_log = 1, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0) +/datum/announcement/priority/New(do_log = 1, new_sound = sound('sound/misc/notice2.ogg'), do_newscast = 0) ..(do_log, new_sound, do_newscast) title = "Priority Announcement" announcement_type = "Priority Announcement" -/datum/announcement/priority/command/New(var/do_log = 1, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0) +/datum/announcement/priority/command/New(do_log = 1, new_sound = sound('sound/misc/notice2.ogg'), do_newscast = 0) ..(do_log, new_sound, do_newscast) admin_announcement = 1 title = "[command_name()] Update" announcement_type = "[command_name()] Update" -/datum/announcement/priority/command/event/New(var/do_log = 1, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0) +/datum/announcement/priority/command/event/New(do_log = 1, new_sound = sound('sound/misc/notice2.ogg'), do_newscast = 0) ..(do_log, new_sound, do_newscast) admin_announcement = 0 -/datum/announcement/priority/security/New(var/do_log = 1, var/new_sound = sound('sound/misc/notice2.ogg'), var/do_newscast = 0) +/datum/announcement/priority/security/New(do_log = 1, new_sound = sound('sound/misc/notice2.ogg'), do_newscast = 0) ..(do_log, new_sound, do_newscast) title = "Security Announcement" announcement_type = "Security Announcement" -/datum/announcement/proc/Announce(var/message as text, var/new_title = "", var/new_sound = null, var/do_newscast = newscast, var/msg_sanitized = 0, var/from, var/msg_language) +/datum/announcement/proc/Announce(message as text, new_title = "", new_sound = null, do_newscast = newscast, msg_sanitized = 0, from, msg_language) if(!message) return @@ -76,7 +76,7 @@ GLOBAL_DATUM_INIT(event_announcement, /datum/announcement/priority/command/event Sound(message_sound, combined_receivers[1] + combined_receivers[2]) Log(message, message_title) -/datum/announcement/proc/Get_Receivers(var/datum/language/message_language) +/datum/announcement/proc/Get_Receivers(datum/language/message_language) var/list/receivers = list() var/list/garbled_receivers = list() @@ -161,7 +161,7 @@ GLOBAL_DATUM_INIT(event_announcement, /datum/announcement/priority/command/event news.can_be_redacted = 0 announce_newscaster_news(news) -/datum/announcement/proc/Sound(var/message_sound, var/receivers) +/datum/announcement/proc/Sound(message_sound, receivers) if(!message_sound) return for(var/mob/M in receivers) @@ -172,6 +172,6 @@ GLOBAL_DATUM_INIT(event_announcement, /datum/announcement/priority/command/event log_game("[key_name(usr)] has made \a [announcement_type]: [message_title] - [message] - [announcer]") message_admins("[key_name_admin(usr)] has made \a [announcement_type].", 1) -/proc/GetNameAndAssignmentFromId(var/obj/item/card/id/I) +/proc/GetNameAndAssignmentFromId(obj/item/card/id/I) // Format currently matches that of newscaster feeds: Registered Name (Assigned Rank) return I.assignment ? "[I.registered_name] ([I.assignment])" : I.registered_name diff --git a/code/defines/procs/radio.dm b/code/defines/procs/radio.dm index 7c0dc4de7f8..c0f7716557e 100644 --- a/code/defines/procs/radio.dm +++ b/code/defines/procs/radio.dm @@ -3,7 +3,7 @@ #define TELECOMMS_RECEPTION_RECEIVER 2 #define TELECOMMS_RECEPTION_BOTH 3 -/proc/get_frequency_name(var/display_freq) +/proc/get_frequency_name(display_freq) var/freq_text // the name of the channel diff --git a/code/defines/procs/records.dm b/code/defines/procs/records.dm index a74680ec578..277dae36f1a 100644 --- a/code/defines/procs/records.dm +++ b/code/defines/procs/records.dm @@ -25,7 +25,7 @@ qdel(dummy) return G -/proc/CreateSecurityRecord(var/name as text, var/id as text) +/proc/CreateSecurityRecord(name as text, id as text) var/datum/data/record/R = new /datum/data/record() R.fields["name"] = name R.fields["id"] = id diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index d2485e24357..6565779e14b 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -375,7 +375,7 @@ #define ENVIRON 3 */ -/area/proc/powered(var/chan) // return true if the area has power to given channel +/area/proc/powered(chan) // return true if the area has power to given channel if(!requires_power) return 1 @@ -405,7 +405,7 @@ SEND_SIGNAL(src, COMSIG_AREA_POWER_CHANGE) updateicon() -/area/proc/usage(var/chan) +/area/proc/usage(chan) var/used = 0 switch(chan) if(LIGHT) @@ -439,7 +439,7 @@ used_light = 0 used_environ = 0 -/area/proc/use_power(var/amount, var/chan) +/area/proc/use_power(amount, chan) switch(chan) if(EQUIP) used_equip += amount @@ -448,7 +448,7 @@ if(ENVIRON) used_environ += amount -/area/proc/use_battery_power(var/amount, var/chan) +/area/proc/use_battery_power(amount, chan) switch(chan) if(EQUIP) used_equip += amount @@ -488,14 +488,14 @@ else if(L && L.client && !(L.client.prefs.sound & SOUND_BUZZ)) L.client.ambience_playing = FALSE -/area/proc/gravitychange(var/gravitystate = 0, var/area/A) +/area/proc/gravitychange(gravitystate = 0, area/A) A.has_gravity = gravitystate if(gravitystate) for(var/mob/living/carbon/human/M in A) thunk(M) -/area/proc/thunk(var/mob/living/carbon/human/M) +/area/proc/thunk(mob/living/carbon/human/M) if(istype(M,/mob/living/carbon/human/)) // Only humans can wear magboots, so we give them a chance to. if(istype(M.shoes, /obj/item/clothing/shoes/magboots) && (M.shoes.flags & NOSLIP)) return diff --git a/code/game/area/areas/depot-areas.dm b/code/game/area/areas/depot-areas.dm index fa667e73bfa..ec1ba64deec 100644 --- a/code/game/area/areas/depot-areas.dm +++ b/code/game/area/areas/depot-areas.dm @@ -314,7 +314,7 @@ for(var/obj/machinery/computer/syndicate_depot/C in src) C.security_lockout = FALSE -/area/syndicate_depot/core/proc/set_emergency_access(var/openaccess) +/area/syndicate_depot/core/proc/set_emergency_access(openaccess) for(var/obj/machinery/door/airlock/A in src) if(istype(A, /obj/machinery/door/airlock/hatch/syndicate/vault)) continue diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 1de0e2c8994..bd50dbb56c5 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -132,7 +132,7 @@ // Used in shuttle movement and AI eye stuff. // Primarily used to notify objects being moved by a shuttle/bluespace fuckup. -/atom/movable/proc/setLoc(var/T, var/teleported=0) +/atom/movable/proc/setLoc(T, teleported=0) loc = T /atom/movable/Move(atom/newloc, direct = 0, movetime) @@ -308,7 +308,7 @@ //Return 0 to have src start/keep drifting in a no-grav area and 1 to stop/not start drifting //Mobs should return 1 if they should be able to move of their own volition, see client/Move() in mob_movement.dm //movement_dir == 0 when stopping or any dir when trying to move -/atom/movable/proc/Process_Spacemove(var/movement_dir = 0) +/atom/movable/proc/Process_Spacemove(movement_dir = 0) if(has_gravity(src)) return 1 diff --git a/code/game/gamemodes/blob/blob.dm b/code/game/gamemodes/blob/blob.dm index a1c04e93d46..83fefdf9deb 100644 --- a/code/game/gamemodes/blob/blob.dm +++ b/code/game/gamemodes/blob/blob.dm @@ -63,7 +63,7 @@ GLOBAL_LIST_EMPTY(blob_nodes) return candidates -/datum/game_mode/blob/proc/blobize(var/mob/living/carbon/human/blob) +/datum/game_mode/blob/proc/blobize(mob/living/carbon/human/blob) var/datum/mind/blobmind = blob.mind if(!istype(blobmind)) return 0 @@ -79,7 +79,7 @@ GLOBAL_LIST_EMPTY(blob_nodes) burst_blob(blobmind) return 1 -/datum/game_mode/blob/proc/make_blobs(var/count) +/datum/game_mode/blob/proc/make_blobs(count) var/list/candidates = get_blob_candidates() var/mob/living/carbon/human/blob = null count=min(count, candidates.len) @@ -97,7 +97,7 @@ GLOBAL_LIST_EMPTY(blob_nodes) to_chat(world, "You must kill it all while minimizing the damage to the station.") -/datum/game_mode/blob/proc/greet_blob(var/datum/mind/blob) +/datum/game_mode/blob/proc/greet_blob(datum/mind/blob) to_chat(blob.current, "You are infected by the Blob!") to_chat(blob.current, "Your body is ready to give spawn to a new blob core which will eat this station.") to_chat(blob.current, "Find a good location to spawn the core and then take control and overwhelm the station!") @@ -106,7 +106,7 @@ GLOBAL_LIST_EMPTY(blob_nodes) SEND_SOUND(blob.current, sound('sound/magic/mutate.ogg')) return -/datum/game_mode/blob/proc/show_message(var/message) +/datum/game_mode/blob/proc/show_message(message) for(var/datum/mind/blob in infected_crew) to_chat(blob.current, message) @@ -114,7 +114,7 @@ GLOBAL_LIST_EMPTY(blob_nodes) for(var/datum/mind/blob in infected_crew) burst_blob(blob) -/datum/game_mode/blob/proc/burst_blob(var/datum/mind/blob, var/warned=0) +/datum/game_mode/blob/proc/burst_blob(datum/mind/blob, warned=0) var/client/blob_client = null var/turf/location = null @@ -190,7 +190,7 @@ GLOBAL_LIST_EMPTY(blob_nodes) return ..() -/datum/game_mode/blob/proc/stage(var/stage) +/datum/game_mode/blob/proc/stage(stage) switch(stage) if(0) send_intercept(1) diff --git a/code/game/gamemodes/blob/blob_report.dm b/code/game/gamemodes/blob/blob_report.dm index 93b84dbb54d..670c9ea8aa4 100644 --- a/code/game/gamemodes/blob/blob_report.dm +++ b/code/game/gamemodes/blob/blob_report.dm @@ -1,4 +1,4 @@ -/datum/game_mode/blob/proc/send_intercept(var/report = 1) +/datum/game_mode/blob/proc/send_intercept(report = 1) var/intercepttext = "" var/interceptname = "" switch(report) @@ -89,7 +89,7 @@ else if(istype(O, /obj/machinery)) src.mach += 1 -/datum/station_state/proc/score(var/datum/station_state/result) +/datum/station_state/proc/score(datum/station_state/result) if(!result) return 0 var/output = 0 output += (result.floor / max(floor,1)) diff --git a/code/game/gamemodes/blob/blobs/blob_mobs.dm b/code/game/gamemodes/blob/blobs/blob_mobs.dm index cdc8caaaf74..7c8bd56e822 100644 --- a/code/game/gamemodes/blob/blobs/blob_mobs.dm +++ b/code/game/gamemodes/blob/blobs/blob_mobs.dm @@ -20,7 +20,7 @@ fire_damage = 3 var/mob/camera/blob/overmind = null -/mob/living/simple_animal/hostile/blob/proc/adjustcolors(var/a_color) +/mob/living/simple_animal/hostile/blob/proc/adjustcolors(a_color) if(a_color) color = a_color @@ -69,7 +69,7 @@ return 1 return ..() -/mob/living/simple_animal/hostile/blob/blobspore/New(loc, var/obj/structure/blob/factory/linked_node) +/mob/living/simple_animal/hostile/blob/blobspore/New(loc, obj/structure/blob/factory/linked_node) if(istype(linked_node)) factory = linked_node factory.spores += src @@ -149,7 +149,7 @@ adjustcolors(overmind?.blob_reagent_datum?.complementary_color) -/mob/living/simple_animal/hostile/blob/blobspore/adjustcolors(var/a_color) +/mob/living/simple_animal/hostile/blob/blobspore/adjustcolors(a_color) color = a_color if(is_zombie) diff --git a/code/game/gamemodes/blob/blobs/core.dm b/code/game/gamemodes/blob/blobs/core.dm index bd86b7ff1fc..a12f53150ca 100644 --- a/code/game/gamemodes/blob/blobs/core.dm +++ b/code/game/gamemodes/blob/blobs/core.dm @@ -27,7 +27,7 @@ point_rate = new_rate -/obj/structure/blob/core/adjustcolors(var/a_color) +/obj/structure/blob/core/adjustcolors(a_color) overlays.Cut() color = null var/image/I = new('icons/mob/blob.dmi', "blob") diff --git a/code/game/gamemodes/blob/blobs/node.dm b/code/game/gamemodes/blob/blobs/node.dm index 90982d70e2b..0023328b463 100644 --- a/code/game/gamemodes/blob/blobs/node.dm +++ b/code/game/gamemodes/blob/blobs/node.dm @@ -11,7 +11,7 @@ GLOB.blob_nodes += src START_PROCESSING(SSobj, src) -/obj/structure/blob/node/adjustcolors(var/a_color) +/obj/structure/blob/node/adjustcolors(a_color) overlays.Cut() color = null var/image/I = new('icons/mob/blob.dmi', "blob") diff --git a/code/game/gamemodes/blob/blobs/storage.dm b/code/game/gamemodes/blob/blobs/storage.dm index b9052b3601a..ced60709575 100644 --- a/code/game/gamemodes/blob/blobs/storage.dm +++ b/code/game/gamemodes/blob/blobs/storage.dm @@ -11,6 +11,6 @@ overmind.max_blob_points -= 50 ..() -/obj/structure/blob/storage/proc/update_max_blob_points(var/new_point_increase) +/obj/structure/blob/storage/proc/update_max_blob_points(new_point_increase) if(overmind) overmind.max_blob_points += new_point_increase diff --git a/code/game/gamemodes/blob/overmind.dm b/code/game/gamemodes/blob/overmind.dm index 7e60aeee6bf..e5da77c8196 100644 --- a/code/game/gamemodes/blob/overmind.dm +++ b/code/game/gamemodes/blob/overmind.dm @@ -55,13 +55,13 @@ if(blob_core && hud_used) hud_used.blobhealthdisplay.maptext = "
[round(blob_core.obj_integrity)]
" -/mob/camera/blob/proc/add_points(var/points) +/mob/camera/blob/proc/add_points(points) if(points != 0) blob_points = clamp(blob_points + points, 0, max_blob_points) if(hud_used) hud_used.blobpwrdisplay.maptext = "
[round(src.blob_points)]
" -/mob/camera/blob/say(var/message) +/mob/camera/blob/say(message) if(!message) return @@ -105,7 +105,7 @@ stat(null, "Core Health: [blob_core.obj_integrity]") stat(null, "Power Stored: [blob_points]/[max_blob_points]") -/mob/camera/blob/Move(var/NewLoc, var/Dir = 0) +/mob/camera/blob/Move(NewLoc, Dir = 0) var/obj/structure/blob/B = locate() in range("3x3", NewLoc) if(B) loc = NewLoc diff --git a/code/game/gamemodes/blob/powers.dm b/code/game/gamemodes/blob/powers.dm index 40cde4ad9db..6ed1bc1aef8 100644 --- a/code/game/gamemodes/blob/powers.dm +++ b/code/game/gamemodes/blob/powers.dm @@ -1,6 +1,6 @@ // Point controlling procs -/mob/camera/blob/proc/can_buy(var/cost = 15) +/mob/camera/blob/proc/can_buy(cost = 15) if(blob_points < cost) to_chat(src, "You cannot afford this!") return 0 @@ -50,7 +50,7 @@ var/turf/T = get_turf(src) create_shield(T) -/mob/camera/blob/proc/create_shield(var/turf/T) +/mob/camera/blob/proc/create_shield(turf/T) var/obj/structure/blob/B = locate(/obj/structure/blob) in T var/obj/structure/blob/shield/S = locate(/obj/structure/blob/shield) in T @@ -283,7 +283,7 @@ var/turf/T = get_turf(src) remove_blob(T) -/mob/camera/blob/proc/remove_blob(var/turf/T) +/mob/camera/blob/proc/remove_blob(turf/T) var/obj/structure/blob/B = locate(/obj/structure/blob) in T if(!T) @@ -312,7 +312,7 @@ var/turf/T = get_turf(src) expand_blob(T) -/mob/camera/blob/proc/expand_blob(var/turf/T) +/mob/camera/blob/proc/expand_blob(turf/T) if(!T) return @@ -350,7 +350,7 @@ var/turf/T = get_turf(src) rally_spores(T) -/mob/camera/blob/proc/rally_spores(var/turf/T) +/mob/camera/blob/proc/rally_spores(turf/T) to_chat(src, "You rally your spores.") var/list/surrounding_turfs = block(locate(T.x - 1, T.y - 1, T.z), locate(T.x + 1, T.y + 1, T.z)) diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm index 2864854a1e9..b1c5ffde619 100644 --- a/code/game/gamemodes/blob/theblob.dm +++ b/code/game/gamemodes/blob/theblob.dm @@ -73,7 +73,7 @@ health_timestamp = world.time + 10 // 1 seconds -/obj/structure/blob/proc/Pulse(var/pulse = 0, var/origin_dir = 0, var/a_color)//Todo: Fix spaceblob expand +/obj/structure/blob/proc/Pulse(pulse = 0, origin_dir = 0, a_color)//Todo: Fix spaceblob expand RegenHealth() if(run_action())//If we can do something here then we dont need to pulse more @@ -110,7 +110,7 @@ if(iswallturf(loc)) loc.blob_act(src) //don't ask how a wall got on top of the core, just eat it -/obj/structure/blob/proc/expand(var/turf/T = null, var/prob = 1, var/a_color) +/obj/structure/blob/proc/expand(turf/T = null, prob = 1, a_color) if(prob && !prob(obj_integrity)) return if(istype(T, /turf/space) && prob(75)) return @@ -139,7 +139,7 @@ A.blob_act(src) return 1 -/obj/structure/blob/Crossed(var/mob/living/L, oldloc) +/obj/structure/blob/Crossed(mob/living/L, oldloc) ..() L.blob_act(src) @@ -188,7 +188,7 @@ if(. && obj_integrity > 0) update_icon() -/obj/structure/blob/proc/change_to(var/type) +/obj/structure/blob/proc/change_to(type) if(!ispath(type)) error("[type] is an invalid type for the blob.") var/obj/structure/blob/B = new type(src.loc) @@ -198,7 +198,7 @@ B.adjustcolors(color) qdel(src) -/obj/structure/blob/proc/adjustcolors(var/a_color) +/obj/structure/blob/proc/adjustcolors(a_color) if(a_color) color = a_color return diff --git a/code/game/gamemodes/changeling/changeling_power.dm b/code/game/gamemodes/changeling/changeling_power.dm index dc5c0f9f90c..47f83b4618b 100644 --- a/code/game/gamemodes/changeling/changeling_power.dm +++ b/code/game/gamemodes/changeling/changeling_power.dm @@ -25,7 +25,7 @@ if you override it, MAKE SURE you call parent or it will not be usable the same goes for Remove(). if you override Remove(), call parent or else your power wont be removed on respec */ -/datum/action/changeling/proc/on_purchase(var/mob/user) +/datum/action/changeling/proc/on_purchase(mob/user) if(needs_button) Grant(user) @@ -46,18 +46,18 @@ the same goes for Remove(). if you override Remove(), call parent or else your p sting_feedback(user, target) take_chemical_cost(c) -/datum/action/changeling/proc/sting_action(var/mob/user, var/mob/target) +/datum/action/changeling/proc/sting_action(mob/user, mob/target) return 0 -/datum/action/changeling/proc/sting_feedback(var/mob/user, var/mob/target) +/datum/action/changeling/proc/sting_feedback(mob/user, mob/target) return 0 -/datum/action/changeling/proc/take_chemical_cost(var/datum/changeling/changeling) +/datum/action/changeling/proc/take_chemical_cost(datum/changeling/changeling) changeling.chem_charges -= chemical_cost changeling.geneticdamage += genetic_damage //Fairly important to remember to return 1 on success >.< -/datum/action/changeling/proc/can_sting(var/mob/user, var/mob/target) +/datum/action/changeling/proc/can_sting(mob/user, mob/target) if(!ishuman(user)) //typecast everything from mob to carbon from this point onwards return 0 if(req_human && (!ishuman(user) || issmall(user))) @@ -82,7 +82,7 @@ the same goes for Remove(). if you override Remove(), call parent or else your p return 1 //used in /mob/Stat() -/datum/action/changeling/proc/can_be_used_by(var/mob/user) +/datum/action/changeling/proc/can_be_used_by(mob/user) if(!ishuman(user)) return 0 if(req_human && !ishuman(user)) @@ -90,7 +90,7 @@ the same goes for Remove(). if you override Remove(), call parent or else your p return 1 // Transform the target to the chosen dna. Used in transform.dm and tiny_prick.dm (handy for changes since it's the same thing done twice) -/datum/action/changeling/proc/transform_dna(var/mob/living/carbon/human/H, var/datum/dna/D) +/datum/action/changeling/proc/transform_dna(mob/living/carbon/human/H, datum/dna/D) if(!D) return diff --git a/code/game/gamemodes/changeling/evolution_menu.dm b/code/game/gamemodes/changeling/evolution_menu.dm index 8485f8f0540..c07e8ac083b 100644 --- a/code/game/gamemodes/changeling/evolution_menu.dm +++ b/code/game/gamemodes/changeling/evolution_menu.dm @@ -84,7 +84,7 @@ view_mode = new_view_mode return TRUE -/datum/changeling/proc/purchasePower(var/mob/living/carbon/user, var/sting_name) +/datum/changeling/proc/purchasePower(mob/living/carbon/user, sting_name) var/datum/action/changeling/thepower = null var/list/all_powers = init_subtypes(/datum/action/changeling) @@ -122,7 +122,7 @@ return TRUE //Reselect powers -/datum/changeling/proc/lingRespec(var/mob/user) +/datum/changeling/proc/lingRespec(mob/user) if(!ishuman(user) || issmall(user)) to_chat(user, "We can't remove our evolutions in this form!") return FALSE @@ -136,7 +136,7 @@ to_chat(user, "You lack the power to readapt your evolutions!") return FALSE -/mob/proc/make_changeling(var/get_free_powers = TRUE) +/mob/proc/make_changeling(get_free_powers = TRUE) if(!mind) return if(!ishuman(src)) @@ -170,7 +170,7 @@ return 1 //Used to dump the languages from the changeling datum into the actual mob. -/mob/proc/changeling_update_languages(var/updated_languages) +/mob/proc/changeling_update_languages(updated_languages) for(var/datum/language/L in updated_languages) add_language("L.name") @@ -190,7 +190,7 @@ chem_recharge_slowdown = initial(chem_recharge_slowdown) mimicing = "" -/mob/proc/remove_changeling_powers(var/keep_free_powers=0) +/mob/proc/remove_changeling_powers(keep_free_powers=0) if(ishuman(src)) if(mind && mind.changeling) digitalcamo = 0 diff --git a/code/game/gamemodes/changeling/powers/absorb.dm b/code/game/gamemodes/changeling/powers/absorb.dm index bae3f75ce6b..33c0501c7d5 100644 --- a/code/game/gamemodes/changeling/powers/absorb.dm +++ b/code/game/gamemodes/changeling/powers/absorb.dm @@ -27,7 +27,7 @@ var/mob/living/carbon/target = G.affecting return changeling.can_absorb_dna(user,target) -/datum/action/changeling/absorbDNA/sting_action(var/mob/user) +/datum/action/changeling/absorbDNA/sting_action(mob/user) var/datum/changeling/changeling = user.mind.changeling var/obj/item/grab/G = user.get_active_hand() var/mob/living/carbon/human/target = G.affecting @@ -101,7 +101,7 @@ return 1 //Absorbs the target DNA. -/datum/changeling/proc/absorb_dna(mob/living/carbon/T, var/mob/user) +/datum/changeling/proc/absorb_dna(mob/living/carbon/T, mob/user) T.dna.real_name = T.real_name //Set this again, just to be sure that it's properly set. var/datum/dna/new_dna = T.dna.Clone() //Steal all of their languages! @@ -113,7 +113,7 @@ absorbedcount++ store_dna(new_dna, user) -/datum/changeling/proc/store_dna(var/datum/dna/new_dna, var/mob/user) +/datum/changeling/proc/store_dna(datum/dna/new_dna, mob/user) for(var/datum/objective/escape/escape_with_identity/E in user.mind.objectives) if(E.target_real_name == new_dna.real_name) protected_dna |= new_dna diff --git a/code/game/gamemodes/changeling/powers/digitalcamo.dm b/code/game/gamemodes/changeling/powers/digitalcamo.dm index d50a2afe5c7..29385d33636 100644 --- a/code/game/gamemodes/changeling/powers/digitalcamo.dm +++ b/code/game/gamemodes/changeling/powers/digitalcamo.dm @@ -6,7 +6,7 @@ dna_cost = 1 //Prevents AIs tracking you but makes you easily detectable to the human-eye. -/datum/action/changeling/digitalcamo/sting_action(var/mob/user) +/datum/action/changeling/digitalcamo/sting_action(mob/user) if(user.digitalcamo) to_chat(user, "We return to normal.") diff --git a/code/game/gamemodes/changeling/powers/epinephrine.dm b/code/game/gamemodes/changeling/powers/epinephrine.dm index 758e9215ed8..ef22de10ce4 100644 --- a/code/game/gamemodes/changeling/powers/epinephrine.dm +++ b/code/game/gamemodes/changeling/powers/epinephrine.dm @@ -9,7 +9,7 @@ req_stat = UNCONSCIOUS //Recover from stuns. -/datum/action/changeling/epinephrine/sting_action(var/mob/living/user) +/datum/action/changeling/epinephrine/sting_action(mob/living/user) if(user.lying) to_chat(user, "We arise.") diff --git a/code/game/gamemodes/changeling/powers/fakedeath.dm b/code/game/gamemodes/changeling/powers/fakedeath.dm index 343a8e1e1c7..b29dd5f8ac6 100644 --- a/code/game/gamemodes/changeling/powers/fakedeath.dm +++ b/code/game/gamemodes/changeling/powers/fakedeath.dm @@ -9,7 +9,7 @@ max_genetic_damage = 100 //Fake our own death and fully heal. You will appear to be dead but regenerate fully after a short delay. -/datum/action/changeling/fakedeath/sting_action(var/mob/living/user) +/datum/action/changeling/fakedeath/sting_action(mob/living/user) to_chat(user, "We begin our stasis, preparing energy to arise once more.") if(user.stat != DEAD) @@ -30,7 +30,7 @@ var/datum/action/changeling/revive/R = new R.Grant(user) -/datum/action/changeling/fakedeath/can_sting(var/mob/user) +/datum/action/changeling/fakedeath/can_sting(mob/user) if(HAS_TRAIT(user, TRAIT_FAKEDEATH)) to_chat(user, "We are already regenerating.") return diff --git a/code/game/gamemodes/changeling/powers/fleshmend.dm b/code/game/gamemodes/changeling/powers/fleshmend.dm index 6ed396c0cba..99cb6164aa6 100644 --- a/code/game/gamemodes/changeling/powers/fleshmend.dm +++ b/code/game/gamemodes/changeling/powers/fleshmend.dm @@ -25,7 +25,7 @@ recent_uses = max(1, recent_uses - (1 / healing_ticks)) //Starts healing you every second for 10 seconds. Can be used whilst unconscious. -/datum/action/changeling/fleshmend/sting_action(var/mob/living/user) +/datum/action/changeling/fleshmend/sting_action(mob/living/user) to_chat(user, "We begin to heal rapidly.") if(recent_uses > 1) to_chat(user, "Our healing's effectiveness is reduced \ diff --git a/code/game/gamemodes/changeling/powers/hivemind.dm b/code/game/gamemodes/changeling/powers/hivemind.dm index 6506f25263c..f67b222189d 100644 --- a/code/game/gamemodes/changeling/powers/hivemind.dm +++ b/code/game/gamemodes/changeling/powers/hivemind.dm @@ -7,7 +7,7 @@ chemical_cost = -1 needs_button = FALSE -/datum/action/changeling/hivemind_comms/on_purchase(var/mob/user) +/datum/action/changeling/hivemind_comms/on_purchase(mob/user) ..() var/datum/changeling/changeling=user.mind.changeling changeling.changeling_speak = 1 diff --git a/code/game/gamemodes/changeling/powers/humanform.dm b/code/game/gamemodes/changeling/powers/humanform.dm index fd00afab30a..bc413fae216 100644 --- a/code/game/gamemodes/changeling/powers/humanform.dm +++ b/code/game/gamemodes/changeling/powers/humanform.dm @@ -8,7 +8,7 @@ max_genetic_damage = 3 //Transform into a human. -/datum/action/changeling/humanform/sting_action(var/mob/living/carbon/human/user) +/datum/action/changeling/humanform/sting_action(mob/living/carbon/human/user) var/datum/changeling/changeling = user.mind.changeling var/list/names = list() for(var/datum/dna/DNA in (changeling.absorbed_dna+changeling.protected_dna)) diff --git a/code/game/gamemodes/changeling/powers/lesserform.dm b/code/game/gamemodes/changeling/powers/lesserform.dm index c492c47f9c6..9622cb4f48e 100644 --- a/code/game/gamemodes/changeling/powers/lesserform.dm +++ b/code/game/gamemodes/changeling/powers/lesserform.dm @@ -9,7 +9,7 @@ req_human = 1 //Transform into a monkey. -/datum/action/changeling/lesserform/sting_action(var/mob/living/carbon/human/user) +/datum/action/changeling/lesserform/sting_action(mob/living/carbon/human/user) var/datum/changeling/changeling = user.mind.changeling if(!user) return 0 diff --git a/code/game/gamemodes/changeling/powers/mimic_voice.dm b/code/game/gamemodes/changeling/powers/mimic_voice.dm index bcbe91a3cb6..cddb369963a 100644 --- a/code/game/gamemodes/changeling/powers/mimic_voice.dm +++ b/code/game/gamemodes/changeling/powers/mimic_voice.dm @@ -9,7 +9,7 @@ // Fake Voice -/datum/action/changeling/mimicvoice/sting_action(var/mob/user) +/datum/action/changeling/mimicvoice/sting_action(mob/user) var/datum/changeling/changeling=user.mind.changeling if(changeling.mimicing) changeling.mimicing = "" diff --git a/code/game/gamemodes/changeling/powers/mutations.dm b/code/game/gamemodes/changeling/powers/mutations.dm index fb2d19e7d0b..420628a0198 100644 --- a/code/game/gamemodes/changeling/powers/mutations.dm +++ b/code/game/gamemodes/changeling/powers/mutations.dm @@ -21,7 +21,7 @@ var/weapon_type var/weapon_name_simple -/datum/action/changeling/weapon/try_to_sting(var/mob/user, var/mob/target) +/datum/action/changeling/weapon/try_to_sting(mob/user, mob/target) if(istype(user.l_hand, weapon_type)) //Not the nicest way to do it, but eh qdel(user.l_hand) if(!silent) @@ -36,7 +36,7 @@ return ..(user, target) -/datum/action/changeling/weapon/sting_action(var/mob/user) +/datum/action/changeling/weapon/sting_action(mob/user) if(!user.drop_item()) to_chat(user, "The [user.get_active_hand()] is stuck to your hand, you cannot grow a [weapon_name_simple] over it!") return @@ -60,7 +60,7 @@ var/recharge_slowdown = 0 var/blood_on_castoff = 0 -/datum/action/changeling/suit/try_to_sting(var/mob/user, var/mob/target) +/datum/action/changeling/suit/try_to_sting(mob/user, mob/target) var/datum/changeling/changeling = user.mind.changeling if(!ishuman(user) || !changeling) return @@ -84,7 +84,7 @@ return ..(H, target) -/datum/action/changeling/suit/sting_action(var/mob/living/carbon/human/user) +/datum/action/changeling/suit/sting_action(mob/living/carbon/human/user) if(!user.unEquip(user.wear_suit)) to_chat(user, "\the [user.wear_suit] is stuck to your body, you cannot grow a [suit_name_simple] over it!") return @@ -358,7 +358,7 @@ weapon_type = /obj/item/shield/changeling weapon_name_simple = "shield" -/datum/action/changeling/weapon/shield/sting_action(var/mob/user) +/datum/action/changeling/weapon/shield/sting_action(mob/user) var/datum/changeling/changeling = user.mind.changeling //So we can read the absorbedcount. if(!changeling) return diff --git a/code/game/gamemodes/changeling/powers/panacea.dm b/code/game/gamemodes/changeling/powers/panacea.dm index 914a73fa7b4..bc0ff435b38 100644 --- a/code/game/gamemodes/changeling/powers/panacea.dm +++ b/code/game/gamemodes/changeling/powers/panacea.dm @@ -8,7 +8,7 @@ req_stat = UNCONSCIOUS //Heals the things that the other regenerative abilities don't. -/datum/action/changeling/panacea/sting_action(var/mob/user) +/datum/action/changeling/panacea/sting_action(mob/user) to_chat(user, "We cleanse impurities from our form.") diff --git a/code/game/gamemodes/changeling/powers/revive.dm b/code/game/gamemodes/changeling/powers/revive.dm index 13b3877b9bb..8ebe5ba48d8 100644 --- a/code/game/gamemodes/changeling/powers/revive.dm +++ b/code/game/gamemodes/changeling/powers/revive.dm @@ -6,7 +6,7 @@ always_keep = 1 //Revive from regenerative stasis -/datum/action/changeling/revive/sting_action(var/mob/living/carbon/user) +/datum/action/changeling/revive/sting_action(mob/living/carbon/user) user.setToxLoss(0, FALSE) user.setOxyLoss(0, FALSE) user.setCloneLoss(0, FALSE) diff --git a/code/game/gamemodes/changeling/powers/shriek.dm b/code/game/gamemodes/changeling/powers/shriek.dm index 9678a71bc72..b7d021a10d6 100644 --- a/code/game/gamemodes/changeling/powers/shriek.dm +++ b/code/game/gamemodes/changeling/powers/shriek.dm @@ -8,7 +8,7 @@ req_human = 1 //A flashy ability, good for crowd control and sowing chaos. -/datum/action/changeling/resonant_shriek/sting_action(var/mob/user) +/datum/action/changeling/resonant_shriek/sting_action(mob/user) for(var/mob/living/M in get_mobs_in_view(4, user)) if(iscarbon(M)) if(ishuman(M)) @@ -41,7 +41,7 @@ dna_cost = 1 //A flashy ability, good for crowd control and sewing chaos. -/datum/action/changeling/dissonant_shriek/sting_action(var/mob/user) +/datum/action/changeling/dissonant_shriek/sting_action(mob/user) for(var/obj/machinery/light/L in range(5, usr)) L.on = 1 L.break_light_tube() diff --git a/code/game/gamemodes/changeling/powers/spiders.dm b/code/game/gamemodes/changeling/powers/spiders.dm index 5577007a155..4139928dc3c 100644 --- a/code/game/gamemodes/changeling/powers/spiders.dm +++ b/code/game/gamemodes/changeling/powers/spiders.dm @@ -8,7 +8,7 @@ req_dna = 5 //Makes some spiderlings. Good for setting traps and causing general trouble. -/datum/action/changeling/spiders/sting_action(var/mob/user) +/datum/action/changeling/spiders/sting_action(mob/user) for(var/i=0, i<2, i++) var/obj/structure/spider/spiderling/S = new(user.loc) S.grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/hunter diff --git a/code/game/gamemodes/changeling/powers/strained_muscles.dm b/code/game/gamemodes/changeling/powers/strained_muscles.dm index 038cf76331c..a89daed095f 100644 --- a/code/game/gamemodes/changeling/powers/strained_muscles.dm +++ b/code/game/gamemodes/changeling/powers/strained_muscles.dm @@ -12,7 +12,7 @@ var/stacks = 0 //Increments every 5 seconds; damage increases over time var/enabled = 0 //Whether or not you are a hedgehog -/datum/action/changeling/strained_muscles/sting_action(var/mob/living/carbon/user) +/datum/action/changeling/strained_muscles/sting_action(mob/living/carbon/user) enabled = !enabled if(enabled) to_chat(user, "Our muscles tense and strengthen.") diff --git a/code/game/gamemodes/changeling/powers/swap_form.dm b/code/game/gamemodes/changeling/powers/swap_form.dm index 4c44b97f47e..b155cccf5db 100644 --- a/code/game/gamemodes/changeling/powers/swap_form.dm +++ b/code/game/gamemodes/changeling/powers/swap_form.dm @@ -7,7 +7,7 @@ dna_cost = 1 req_human = 1 //Monkeys can't grab -/datum/action/changeling/swap_form/can_sting(var/mob/living/carbon/user) +/datum/action/changeling/swap_form/can_sting(mob/living/carbon/user) if(!..()) return var/obj/item/grab/G = user.get_active_hand() @@ -29,7 +29,7 @@ return return 1 -/datum/action/changeling/swap_form/sting_action(var/mob/living/carbon/user) +/datum/action/changeling/swap_form/sting_action(mob/living/carbon/user) var/obj/item/grab/G = user.get_active_hand() var/mob/living/carbon/human/target = G.affecting var/datum/changeling/changeling = user.mind.changeling diff --git a/code/game/gamemodes/changeling/powers/tiny_prick.dm b/code/game/gamemodes/changeling/powers/tiny_prick.dm index 95432db9424..072f5b8f40d 100644 --- a/code/game/gamemodes/changeling/powers/tiny_prick.dm +++ b/code/game/gamemodes/changeling/powers/tiny_prick.dm @@ -37,7 +37,7 @@ if(mind && mind.changeling && mind.changeling.chosen_sting) mind.changeling.chosen_sting.unset_sting(src) -/datum/action/changeling/sting/can_sting(var/mob/user, var/mob/target) +/datum/action/changeling/sting/can_sting(mob/user, mob/target) if(!..()) return if(!user.mind.changeling.chosen_sting) @@ -57,7 +57,7 @@ return return 1 -/datum/action/changeling/sting/sting_feedback(var/mob/user, var/mob/target) +/datum/action/changeling/sting/sting_feedback(mob/user, mob/target) if(!target) return to_chat(user, "We stealthily sting [target.name].") @@ -91,7 +91,7 @@ return ..() -/datum/action/changeling/sting/transformation/can_sting(var/mob/user, var/mob/target) +/datum/action/changeling/sting/transformation/can_sting(mob/user, mob/target) if(!..()) return if(HAS_TRAIT(target, TRAIT_HUSK) || (!ishuman(target))) @@ -104,7 +104,7 @@ return FALSE return TRUE -/datum/action/changeling/sting/transformation/sting_action(var/mob/user, var/mob/target) +/datum/action/changeling/sting/transformation/sting_action(mob/user, mob/target) add_attack_logs(user, target, "Transformation sting (changeling) (new identity is [selected_dna.real_name])") if(issmall(target)) to_chat(user, "Our genes cry out as we sting [target.name]!") @@ -129,11 +129,11 @@ chemical_cost = 25 dna_cost = 0 -/datum/action/changeling/sting/extract_dna/can_sting(var/mob/user, var/mob/target) +/datum/action/changeling/sting/extract_dna/can_sting(mob/user, mob/target) if(..()) return user.mind.changeling.can_absorb_dna(user, target) -/datum/action/changeling/sting/extract_dna/sting_action(var/mob/user, var/mob/living/carbon/human/target) +/datum/action/changeling/sting/extract_dna/sting_action(mob/user, mob/living/carbon/human/target) add_attack_logs(user, target, "Extraction sting (changeling)") if(!(user.mind.changeling.has_dna(target.dna))) user.mind.changeling.absorb_dna(target, user) @@ -149,7 +149,7 @@ chemical_cost = 20 dna_cost = 2 -/datum/action/changeling/sting/mute/sting_action(var/mob/user, var/mob/living/carbon/target) +/datum/action/changeling/sting/mute/sting_action(mob/user, mob/living/carbon/target) add_attack_logs(user, target, "Mute sting (changeling)") target.AdjustSilence(30) SSblackbox.record_feedback("nested tally", "changeling_powers", 1, list("[name]")) @@ -164,7 +164,7 @@ chemical_cost = 25 dna_cost = 1 -/datum/action/changeling/sting/blind/sting_action(var/mob/living/user, var/mob/living/target) +/datum/action/changeling/sting/blind/sting_action(mob/living/user, mob/living/target) add_attack_logs(user, target, "Blind sting (changeling)") to_chat(target, "Your eyes burn horrifically!") target.become_nearsighted(EYE_DAMAGE) @@ -182,7 +182,7 @@ chemical_cost = 10 dna_cost = 1 -/datum/action/changeling/sting/LSD/sting_action(var/mob/user, var/mob/living/carbon/target) +/datum/action/changeling/sting/LSD/sting_action(mob/user, mob/living/carbon/target) add_attack_logs(user, target, "LSD sting (changeling)") spawn(rand(300,600)) if(target) @@ -199,7 +199,7 @@ chemical_cost = 15 dna_cost = 2 -/datum/action/changeling/sting/cryo/sting_action(var/mob/user, var/mob/target) +/datum/action/changeling/sting/cryo/sting_action(mob/user, mob/target) add_attack_logs(user, target, "Cryo sting (changeling)") if(target.reagents) target.reagents.add_reagent("frostoil", 30) diff --git a/code/game/gamemodes/changeling/powers/transform.dm b/code/game/gamemodes/changeling/powers/transform.dm index f486195b8db..3aaed08b965 100644 --- a/code/game/gamemodes/changeling/powers/transform.dm +++ b/code/game/gamemodes/changeling/powers/transform.dm @@ -9,7 +9,7 @@ max_genetic_damage = 3 //Change our DNA to that of somebody we've absorbed. -/datum/action/changeling/transform/sting_action(var/mob/living/carbon/human/user) +/datum/action/changeling/transform/sting_action(mob/living/carbon/human/user) var/datum/changeling/changeling = user.mind.changeling var/datum/dna/chosen_dna = changeling.select_dna("Select the target DNA: ", "Target DNA") @@ -23,7 +23,7 @@ SSblackbox.record_feedback("nested tally", "changeling_powers", 1, list("[name]")) return 1 -/datum/changeling/proc/select_dna(var/prompt, var/title) +/datum/changeling/proc/select_dna(prompt, title) var/list/names = list() for(var/datum/dna/DNA in (absorbed_dna+protected_dna)) names += "[DNA.real_name]" diff --git a/code/game/gamemodes/devil/contracts/friend.dm b/code/game/gamemodes/devil/contracts/friend.dm deleted file mode 100644 index 8838dc8a371..00000000000 --- a/code/game/gamemodes/devil/contracts/friend.dm +++ /dev/null @@ -1,54 +0,0 @@ -/obj/effect/mob_spawn/human/demonic_friend - name = "Essence of friendship" - desc = "Oh boy! Oh boy! A friend!" - mob_name = "Demonic friend" - icon = 'icons/obj/cardboard_cutout.dmi' - icon_state = "cutout_basic" - outfit = /datum/outfit/demonic_friend - death = FALSE - roundstart = FALSE - random = TRUE - id_job = "SuperFriend" - id_access = "assistant" - var/obj/effect/proc_holder/spell/targeted/summon_friend/spell - var/datum/mind/owner - assignedrole = "SuperFriend" - -/obj/effect/mob_spawn/human/demonic_friend/Initialize(mapload, datum/mind/owner_mind, obj/effect/proc_holder/spell/targeted/summon_friend/summoning_spell) - . = ..() - owner = owner_mind - description = "Be someone's loyal friend/slave. If they die, you die as well." //best I could think of in the moment, not sure how this role plays in practise, have never seen it. - flavour_text = "You have been given a reprieve from your eternity of torment, to be [owner.name]'s friend for [owner.p_their()] short mortal coil. Be aware that if you do not live up to [owner.name]'s expectations, [owner.p_they()] can send you back to hell with a single thought. [owner.name]'s death will also return you to hell." - var/area/A = get_area(src) - if(!mapload && A) - notify_ghosts("\A friendship shell has been completed in \the [A.name].", source = src, action=NOTIFY_ATTACK, flashwindow = TRUE) - objectives = "Be [owner.name]'s friend, and keep [owner.name] alive, so you don't get sent back to hell." - spell = summoning_spell - - -/obj/effect/mob_spawn/human/demonic_friend/special(mob/living/L) - if(!QDELETED(owner.current) && owner.current.stat != DEAD) - L.real_name = "[owner.name]'s best friend" - L.name = L.real_name - soullink(/datum/soullink/oneway/devilfriend, owner.current, L) - spell.friend = L - spell.charge_counter = spell.charge_max - L.mind.hasSoul = FALSE - var/mob/living/carbon/human/H = L - var/obj/item/worn = H.wear_id - var/obj/item/card/id/id = worn.GetID() - id.registered_name = L.real_name - id.update_label() - to_chat(owner.current, "Your friend has arrived!") - else - to_chat(L, "Your owner is already dead! You will soon perish.") - addtimer(CALLBACK(L, /mob.proc/dust), 150) //Give em a few seconds as a mercy. - -/datum/outfit/demonic_friend - name = "Demonic Friend" - uniform = /obj/item/clothing/under/assistantformal - shoes = /obj/item/clothing/shoes/laceup - r_pocket = /obj/item/radio/off - back = /obj/item/storage/backpack - implants = list(/obj/item/implant/mindshield) //No revolutionaries, he's MY friend. - id = /obj/item/card/id diff --git a/code/game/gamemodes/devil/devil.dm b/code/game/gamemodes/devil/devil.dm deleted file mode 100644 index 06933891ba6..00000000000 --- a/code/game/gamemodes/devil/devil.dm +++ /dev/null @@ -1,48 +0,0 @@ -GLOBAL_LIST_INIT(whiteness, list( - /obj/item/clothing/under/color/white = 2, - /obj/item/clothing/under/rank/bartender = 1, - /obj/item/clothing/under/rank/chef = 1, - /obj/item/clothing/under/rank/chief_engineer = 1, - /obj/item/clothing/under/rank/scientist = 1, - /obj/item/clothing/under/rank/chemist = 1, - /obj/item/clothing/under/rank/chief_medical_officer = 1, - /obj/item/clothing/under/rank/geneticist = 1, - /obj/item/clothing/under/rank/virologist = 1, - /obj/item/clothing/under/rank/nursesuit = 1, - /obj/item/clothing/under/rank/medical = 1, - /obj/item/clothing/under/rank/psych = 1, - /obj/item/clothing/under/rank/orderly = 1, - /obj/item/clothing/under/rank/security/brigphys = 1, - /obj/item/clothing/under/rank/internalaffairs = 1, - /obj/item/clothing/under/rank/ntrep = 1, - /obj/item/clothing/under/det = 1, - /obj/item/clothing/under/wedding/bride_white = 1, - /obj/item/clothing/under/mafia/white = 1, - /obj/item/clothing/under/noble_clothes = 1, - /obj/item/clothing/under/sl_suit = 1, - /obj/item/clothing/under/burial = 1 -)) - - - -/mob/living/proc/check_devil_bane_multiplier(obj/item/weapon, mob/living/attacker) - switch(mind.devilinfo.bane) - if(BANE_WHITECLOTHES) - if(istype(attacker, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = attacker - if(H.w_uniform && istype(H.w_uniform, /obj/item/clothing/under)) - var/obj/item/clothing/under/U = H.w_uniform - if(GLOB.whiteness[U.type]) - src.visible_message("[src] seems to have been harmed by the purity of [attacker]'s clothes.", "Unsullied white clothing is disrupting your form.") - return GLOB.whiteness[U.type] + 1 - if(BANE_TOOLBOX) - if(istype(weapon,/obj/item/storage/toolbox)) - src.visible_message("The [weapon] seems unusually robust this time.", "The [weapon] is your unmaking!") - return 2.5 // Will take four hits with a normal toolbox. - if(BANE_HARVEST) - if(istype(weapon,/obj/item/reagent_containers/food/snacks/grown/) || istype(weapon,/obj/item/grown)) - src.visible_message("The spirits of the harvest aid in the exorcism.", "The harvest spirits are harming you.") - src.Weaken(2) - qdel(weapon) - return 2 - return 1 diff --git a/code/game/gamemodes/devil/devil_agent/devil_agent.dm b/code/game/gamemodes/devil/devil_agent/devil_agent.dm deleted file mode 100644 index e9a1d998a7a..00000000000 --- a/code/game/gamemodes/devil/devil_agent/devil_agent.dm +++ /dev/null @@ -1,38 +0,0 @@ -/datum/game_mode/devil/devil_agents - name = "Devil Agents" - config_tag = "devilagents" - required_players = 25 - required_enemies = 3 - recommended_enemies = 8 - - traitors_possible = 10 //hard limit on traitors if scaling is turned off - num_modifier = 4 - objective_count = 2 - - var/list/target_list = list() - var/list/late_joining_list = list() - minimum_devils = 3 - -/datum/game_mode/devil/devil_agents/post_setup() - var/i = 0 - for(var/datum/mind/devil in devils) - i++ - if(i + 1 > devils.len) - i = 0 - target_list[devil] = devils[i + 1] - ..() - -/datum/game_mode/devil/devil_agents/forge_devil_objectives(datum/mind/devil_mind, quantity) - ..(devil_mind, quantity - give_outsell_objective(devil_mind)) - -/datum/game_mode/devil/devil_agents/proc/give_outsell_objective(datum/mind/devil) - //If you override this method, have it return the number of objectives added. - if(target_list.len && target_list[devil]) // Is a double agent - var/datum/mind/target_mind = target_list[devil] - var/datum/objective/devil/outsell/outsellobjective = new - outsellobjective.owner = devil - outsellobjective.target = target_mind - outsellobjective.update_explanation_text() - devil.objectives += outsellobjective - return 1 - return 0 diff --git a/code/game/gamemodes/devil/devil_game_mode.dm b/code/game/gamemodes/devil/devil_game_mode.dm deleted file mode 100644 index 3ea91343f6b..00000000000 --- a/code/game/gamemodes/devil/devil_game_mode.dm +++ /dev/null @@ -1,67 +0,0 @@ -/datum/game_mode/devil - name = "devil" - config_tag = "devil" - protected_jobs = list("Security Officer", "Warden", "Detective", "Nanotrasen Representative", "Security Pod Pilot", "Magistrate", - "Internal Affairs Agent", "Librarian", "Chaplain", "Head of Security", "Captain", "Brig Physician", - "Nanotrasen Navy Officer", "Special Operations Officer", "AI", "Cyborg") - required_players = 2 - required_enemies = 1 - recommended_enemies = 4 - - var/traitors_possible = 4 //hard limit on devils if scaling is turned off - var/num_modifier = 0 // Used for gamemodes, that are a child of traitor, that need more than the usual. - var/objective_count = 2 - var/minimum_devils = 1 - var/devil_scale_coefficient = 10 - -/datum/game_mode/devil/announce() - to_chat(world, {"The current game mode is - Devil!
) - Devils: Purchase souls and tempt the crew to sin!
- Crew: Resist the lure of sin and remain pure!"}) - -/datum/game_mode/devil/pre_setup() - - if(config.protect_roles_from_antagonist) - restricted_jobs += protected_jobs - - var/list/possible_devils = get_players_for_role(ROLE_DEVIL) - var/num_devils = 0 - if(!possible_devils.len) - return 0 - if(config.traitor_scaling) - num_devils = max(1, round((num_players())/(devil_scale_coefficient))+1) - else - num_devils = max(1, min(num_players(), traitors_possible)) - - - for(var/j = 0, j < num_devils, j++) - if (!possible_devils.len) - break - var/datum/mind/devil = pick(possible_devils) - devils += devil - devil.special_role = ROLE_DEVIL - devil.restricted_roles = restricted_jobs - - log_game("[devil.key] (ckey) has been selected as a [config_tag]") - possible_devils.Remove(devil) - - if(devils.len < required_enemies) - return 0 - return 1 - - -/datum/game_mode/devil/post_setup() - for(var/datum/mind/devil in devils) - spawn(rand(10, 100)) - finalize_devil(devil, TRUE) - spawn(100) - forge_devil_objectives(devil, objective_count) //This has to be in a separate loop, as we need devil names to be generated before we give objectives in devil agent. - devil.devilinfo.announce_laws(devil.current) - var/obj_count = 1 - to_chat(devil.current, " Your current objectives:") - for(var/datum/objective/objective in devil.objectives) - to_chat(devil.current, "Objective #[obj_count]: [objective.explanation_text]") - obj_count++ - modePlayer += devils - ..() - return 1 diff --git a/code/game/gamemodes/devil/devilinfo.dm b/code/game/gamemodes/devil/devilinfo.dm deleted file mode 100644 index 6a7646d5e2e..00000000000 --- a/code/game/gamemodes/devil/devilinfo.dm +++ /dev/null @@ -1,559 +0,0 @@ -#define BLOOD_THRESHOLD 3 //How many souls are needed per stage. -#define TRUE_THRESHOLD 7 -#define ARCH_THRESHOLD 12 - -#define BASIC_DEVIL 0 -#define BLOOD_LIZARD 1 -#define TRUE_DEVIL 2 -#define ARCH_DEVIL 3 - -#define LOSS_PER_DEATH 2 - -#define SOULVALUE (soulsOwned.len-reviveNumber) - -#define DEVILRESURRECTTIME 600 - -GLOBAL_LIST_EMPTY(allDevils) -GLOBAL_LIST_INIT(lawlorify, list ( - LORE = list( - OBLIGATION_FOOD = "This devil seems to always offer it's victims food before slaughtering them.", - OBLIGATION_FIDDLE = "This devil will never turn down a musical challenge.", - OBLIGATION_DANCEOFF = "This devil will never turn down a dance off.", - OBLIGATION_GREET = "This devil seems to only be able to converse with people it knows the name of.", - OBLIGATION_PRESENCEKNOWN = "This devil seems to be unable to attack from stealth.", - OBLIGATION_SAYNAME = "He will always chant his name upon killing someone.", - OBLIGATION_ANNOUNCEKILL = "This devil always loudly announces his kills for the world to hear.", - OBLIGATION_ANSWERTONAME = "This devil always responds to his truename.", - BANE_SILVER = "Silver seems to gravely injure this devil.", - BANE_SALT = "Throwing salt at this devil will hinder his ability to use infernal powers temporarily.", - BANE_LIGHT = "Bright flashes will disorient the devil, likely causing him to flee.", - BANE_IRON = "Cold iron will slowly injure him, until he can purge it from his system.", - BANE_WHITECLOTHES = "Wearing clean white clothing will help ward off this devil.", - BANE_HARVEST = "Presenting the labors of a harvest will disrupt the devil.", - BANE_TOOLBOX = "That which holds the means of creation also holds the means of the devil's undoing.", - BAN_HURTWOMAN = "This devil seems to prefer hunting men.", - BAN_CHAPEL = "This devil avoids holy ground.", - BAN_HURTPRIEST = "The anointed clergy appear to be immune to his powers.", - BAN_AVOIDWATER = "The devil seems to have some sort of aversion to water, though it does not appear to harm him.", - BAN_STRIKEUNCONCIOUS = "This devil only shows interest in those who are awake.", - BAN_HURTLIZARD = "This devil will not strike an Unathi first.", - BAN_HURTANIMAL = "This devil avoids hurting animals.", - BANISH_WATER = "To banish the devil, you must infuse it's body with holy water.", - BANISH_COFFIN = "This devil will return to life if it's remains are not placed within a coffin.", - BANISH_FORMALDYHIDE = "To banish the devil, you must inject it's lifeless body with embalming fluid.", - BANISH_RUNES = "This devil will resurrect after death, unless it's remains are within a rune.", - BANISH_CANDLES = "A large number of nearby lit candles will prevent it from resurrecting.", - BANISH_DESTRUCTION = "It's corpse must be utterly destroyed to prevent resurrection.", - BANISH_FUNERAL_GARB = "If clad in funeral garments, this devil will be unable to resurrect. Should the clothes not fit, lay them gently on top of the devil's corpse." - ), - LAW = list( - OBLIGATION_FOOD = "When not acting in self defense, you must always offer your victim food before harming them.", - OBLIGATION_FIDDLE = "When not in immediate danger, if you are challenged to a musical duel, you must accept it. You are not obligated to duel the same person twice.", - OBLIGATION_DANCEOFF = "When not in immediate danger, if you are challenged to a dance off, you must accept it. You are not obligated to face off with the same person twice.", - OBLIGATION_GREET = "You must always greet other people by their last name before talking with them.", - OBLIGATION_PRESENCEKNOWN = "You must always make your presence known before attacking.", - OBLIGATION_SAYNAME = "You must always say your true name after you kill someone.", - OBLIGATION_ANNOUNCEKILL = "Upon killing someone, you must make your deed known to all within earshot, over comms if reasonably possible.", - OBLIGATION_ANSWERTONAME = "If you are not under attack, you must always respond to your true name.", - BAN_HURTWOMAN = "You must never harm a female outside of self defense.", - BAN_CHAPEL = "You must never attempt to enter the chapel.", - BAN_HURTPRIEST = "You must never attack a priest.", - BAN_AVOIDWATER = "You must never willingly touch a wet surface.", - BAN_STRIKEUNCONCIOUS = "You must never strike an unconscious person.", - BAN_HURTLIZARD = "You must never harm an Unathi outside of self defense.", - BAN_HURTANIMAL = "You must never harm a non-sentient creature or robot outside of self defense.", - BANE_SILVER = "Silver, in all of it's forms shall be your downfall.", - BANE_SALT = "Salt will disrupt your magical abilities.", - BANE_LIGHT = "Blinding lights will prevent you from using offensive powers for a time.", - BANE_IRON = "Cold wrought iron shall act as poison to you.", - BANE_WHITECLOTHES = "Those clad in pristine white garments will strike you true.", - BANE_HARVEST = "The fruits of the harvest shall be your downfall.", - BANE_TOOLBOX = "Toolboxes are bad news for you, for some reason.", - BANISH_WATER = "If your corpse is filled with holy water, you will be unable to resurrect.", - BANISH_COFFIN = "If your corpse is in a coffin, you will be unable to resurrect.", - BANISH_FORMALDYHIDE = "If your corpse is embalmed, you will be unable to resurrect.", - BANISH_RUNES = "If your corpse is placed within a rune, you will be unable to resurrect.", - BANISH_CANDLES = "If your corpse is near lit candles, you will be unable to resurrect.", - BANISH_DESTRUCTION = "If your corpse is destroyed, you will be unable to resurrect.", - BANISH_FUNERAL_GARB = "If your corpse is clad in funeral garments, you will be unable to resurrect." - ) - )) - -/datum/devilinfo - var/datum/mind/owner = null - var/obligation - var/ban - var/bane - var/banish - var/truename - var/list/datum/mind/soulsOwned = new - var/datum/dna/humanform = null - var/reviveNumber = 0 - var/form = BASIC_DEVIL - var/exists = 0 - var/static/list/dont_remove_spells = list( - /obj/effect/proc_holder/spell/targeted/click/summon_contract, - /obj/effect/proc_holder/spell/targeted/conjure_item/violin, - /obj/effect/proc_holder/spell/targeted/summon_dancefloor) - var/ascendable = FALSE - -/datum/devilinfo/New() - ..() - dont_remove_spells = typecacheof(dont_remove_spells) - -/proc/randomDevilInfo(name = randomDevilName()) - var/datum/devilinfo/devil = new - devil.truename = name - devil.bane = randomdevilbane() - devil.obligation = randomdevilobligation() - devil.ban = randomdevilban() - devil.banish = randomdevilbanish() - return devil - -/proc/devilInfo(name, saveDetails = 0) - if(GLOB.allDevils[lowertext(name)]) - return GLOB.allDevils[lowertext(name)] - else - var/datum/devilinfo/devil = randomDevilInfo(name) - GLOB.allDevils[lowertext(name)] = devil - devil.exists = saveDetails - return devil - - - -/proc/randomDevilName() - var/preTitle = "" - var/title = "" - var/mainName = "" - var/suffix = "" - if(prob(65)) - if(prob(35)) - preTitle = pick("Dark ", "Hellish ", "Fiery ", "Sinful ", "Blood ") - title = pick("Lord ", "Fallen Prelate ", "Count ", "Viscount ", "Vizier ", "Elder ", "Adept ") - var/probability = 100 - mainName = pick("Hal", "Ve", "Odr", "Neit", "Ci", "Quon", "Mya", "Folth", "Wren", "Gyer", "Geyr", "Hil", "Niet", "Twou", "Hu", "Don") - while(prob(probability)) - mainName += pick("hal", "ve", "odr", "neit", "ca", "quon", "mya", "folth", "wren", "gyer", "geyr", "hil", "niet", "twoe", "phi", "coa") - probability -= 20 - if(prob(40)) - suffix = pick(" the Red", " the Soulless", " the Master", ", the Lord of all things", ", Jr.") - return preTitle + title + mainName + suffix - -/proc/randomdevilobligation() - return pick(OBLIGATION_FOOD, OBLIGATION_FIDDLE, OBLIGATION_DANCEOFF, OBLIGATION_GREET, OBLIGATION_PRESENCEKNOWN, OBLIGATION_SAYNAME, OBLIGATION_ANNOUNCEKILL, OBLIGATION_ANSWERTONAME) - -/proc/randomdevilban() - return pick(BAN_HURTWOMAN, BAN_CHAPEL, BAN_HURTPRIEST, BAN_AVOIDWATER, BAN_STRIKEUNCONCIOUS, BAN_HURTLIZARD, BAN_HURTANIMAL) - -/proc/randomdevilbane() - return pick(BANE_SALT, BANE_LIGHT, BANE_IRON, BANE_WHITECLOTHES, BANE_SILVER, BANE_HARVEST, BANE_TOOLBOX) - -/proc/randomdevilbanish() - return pick(BANISH_WATER, BANISH_COFFIN, BANISH_FORMALDYHIDE, BANISH_RUNES, BANISH_CANDLES, BANISH_DESTRUCTION, BANISH_FUNERAL_GARB) - -/datum/devilinfo/proc/link_with_mob(mob/living/L) - if(istype(L, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = L - humanform = H.dna.Clone() - owner = L.mind - give_base_spells(1) - -/datum/devilinfo/proc/add_soul(datum/mind/soul) - if(soulsOwned.Find(soul)) - return - soulsOwned += soul - owner.current.set_nutrition(NUTRITION_LEVEL_FULL) - to_chat(owner.current, "You feel satiated as you received a new soul.") - update_hud() - switch(SOULVALUE) - if(0) - to_chat(owner.current, "Your hellish powers have been restored.") - give_base_spells() - if(BLOOD_THRESHOLD) - to_chat(owner.current, "You feel as though your humanoid form is about to shed. You will soon turn into a blood lizard.") - sleep(50) - increase_blood_lizard() - if(TRUE_THRESHOLD) - to_chat(owner.current, "You feel as though your current form is about to shed. You will soon turn into a true devil.") - sleep(50) - increase_true_devil() - if(ARCH_THRESHOLD) - arch_devil_prelude() - increase_arch_devil() - -/datum/devilinfo/proc/remove_soul(datum/mind/soul) - if(soulsOwned.Remove(soul)) - to_chat(owner.current, "You feel as though a soul has slipped from your grasp.") - check_regression() - update_hud() - -/datum/devilinfo/proc/check_regression() - if(form == ARCH_DEVIL) - return //arch devil can't regress - //Yes, fallthrough behavior is intended, so I can't use a switch statement. - if(form == TRUE_DEVIL && SOULVALUE < TRUE_THRESHOLD) - regress_blood_lizard() - if(form == BLOOD_LIZARD && SOULVALUE < BLOOD_THRESHOLD) - regress_humanoid() - if(SOULVALUE < 0) - remove_spells() - to_chat(owner.current, "As punishment for your failures, all of your powers except contract creation have been revoked.") - -/datum/devilinfo/proc/regress_humanoid() - to_chat(owner.current, "Your powers weaken, have more contracts be signed to regain power.") - if(istype(owner.current, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = owner.current - if(humanform) - H.set_species(humanform.species) - H.dna = humanform.Clone() - H.sync_organ_dna(assimilate = 0) - else - H.set_species(/datum/species/human) - // TODO: Add some appearance randomization here or something - humanform = H.dna.Clone() - H.regenerate_icons() - else - owner.current.color = "" - give_base_spells() - if(istype(owner.current.loc, /obj/effect/dummy/slaughter)) - owner.current.forceMove(get_turf(owner.current))//Fixes dying while jaunted leaving you permajaunted. - form = BASIC_DEVIL - -/datum/devilinfo/proc/regress_blood_lizard() - var/mob/living/carbon/true_devil/D = owner.current - to_chat(D, "Your powers weaken, have more contracts be signed to regain power.") - D.oldform.loc = D.loc - owner.transfer_to(D.oldform) - D.oldform.status_flags &= ~GODMODE - give_lizard_spells() - qdel(D) - form = BLOOD_LIZARD - update_hud() - - -/datum/devilinfo/proc/increase_blood_lizard() - if(ishuman(owner.current)) - var/mob/living/carbon/human/H = owner.current - var/list/language_temp = H.languages.Copy() - H.set_species(/datum/species/unathi) - H.languages = language_temp - H.underwear = "Nude" - H.undershirt = "Nude" - H.socks = "Nude" - H.change_skin_color(80, 16, 16) //A deep red - H.regenerate_icons() - else //Did the devil get hit by a staff of transmutation? - owner.current.color = "#501010" - give_lizard_spells() - form = BLOOD_LIZARD - - - -/datum/devilinfo/proc/increase_true_devil() - var/mob/living/carbon/true_devil/A = new /mob/living/carbon/true_devil(owner.current.loc, owner.current) - A.faction |= "hell" - // Put the old body in stasis - owner.current.status_flags |= GODMODE - owner.current.loc = A - A.oldform = owner.current - owner.transfer_to(A) - A.set_name() - give_true_spells() - form = TRUE_DEVIL - update_hud() - -/datum/devilinfo/proc/arch_devil_prelude() - if(!ascendable) - return - var/mob/living/carbon/true_devil/D = owner.current - to_chat(D, "You feel as though your form is about to ascend.") - sleep(50) - if(!D) - return - D.visible_message("[D]'s skin begins to erupt with spikes.", \ - "Your flesh begins creating a shield around yourself.") - sleep(100) - if(!D) - return - D.visible_message("The horns on [D]'s head slowly grow and elongate.", \ - "Your body continues to mutate. Your telepathic abilities grow.") - sleep(90) - if(!D) - return - D.visible_message("[D]'s body begins to violently stretch and contort.", \ - "You begin to rend apart the final barriers to ultimate power.") - sleep(40) - if(!D) - return - to_chat(D, "Yes!") - sleep(10) - if(!D) - return - to_chat(D, "YES!!") - sleep(10) - if(!D) - return - to_chat(D, "YE--") - sleep(1) - if(!D) - return - to_chat(world, "SLOTH, WRATH, GLUTTONY, ACEDIA, ENVY, GREED, PRIDE! FIRES OF HELL AWAKEN!!") - SEND_SOUND(world, sound('sound/hallucinations/veryfar_noise.ogg')) - sleep(50) - if(!SSticker.mode.devil_ascended) - SSshuttle.emergency.request(null, 0.3) - SSticker.mode.devil_ascended++ - -/datum/devilinfo/proc/increase_arch_devil() - if(!ascendable) - return - var/mob/living/carbon/true_devil/D = owner.current - if(!istype(D)) - return - give_arch_spells() - D.convert_to_archdevil() - if(istype(D.loc, /obj/effect/dummy/slaughter)) - D.forceMove(get_turf(D)) - var/area/A = get_area(owner.current) - if(A) - notify_ghosts("An arch devil has ascended in [A.name]. Reach out to the devil to start climbing the infernal corporate ladder.", title = "Arch Devil Ascended", source = owner.current, action = NOTIFY_ATTACK) - form = ARCH_DEVIL - -/datum/devilinfo/proc/remove_spells() - for(var/X in owner.spell_list) - var/obj/effect/proc_holder/spell/S = X - if(!is_type_in_typecache(S, dont_remove_spells)) - owner.RemoveSpell(S) - -/datum/devilinfo/proc/give_summon_contract() - owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/click/summon_contract(null)) - - -/datum/devilinfo/proc/give_base_spells(give_summon_contract = 0) - remove_spells() - owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/click/fireball/hellish(null)) - owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork(null)) - if(give_summon_contract) - give_summon_contract() - if(obligation == OBLIGATION_FIDDLE) - owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/conjure_item/violin(null)) - if(obligation == OBLIGATION_DANCEOFF) - owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/summon_dancefloor(null)) - -/datum/devilinfo/proc/give_lizard_spells() - remove_spells() - owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork(null)) - owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/click/fireball/hellish(null)) - owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/infernal_jaunt(null)) - -/datum/devilinfo/proc/give_true_spells() - remove_spells() - owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork/greater(null)) - owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/click/fireball/hellish(null)) - owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/infernal_jaunt(null)) - owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/sintouch(null)) - -/datum/devilinfo/proc/give_arch_spells() - remove_spells() - owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/conjure_item/pitchfork/ascended(null)) - owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/sintouch/ascended(null)) - -/datum/devilinfo/proc/beginResurrectionCheck(mob/living/body) - if(owner.current != body) - body = owner.current - if(SOULVALUE > 0) - to_chat(owner.current, "Your body has been damaged to the point that you may no longer use it. At the cost of some of your power, you will return to life soon.") - addtimer(CALLBACK(src, "activateResurrection", body), DEVILRESURRECTTIME) - else - to_chat(owner.messageable_mob(), "Your hellish powers are too weak to resurrect yourself.") - -/datum/devilinfo/proc/activateResurrection(mob/living/body) - if(QDELETED(body) || body.stat == DEAD) - if(SOULVALUE > 0) - if(check_banishment(body)) - to_chat(owner.messageable_mob(), "Unfortunately, the mortals have finished a ritual that prevents your resurrection.") - return -1 - else - to_chat(owner.messageable_mob(), "WE LIVE AGAIN!") - return hellish_resurrection(body) - else - to_chat(owner.messageable_mob(), "Unfortunately, the power that stemmed from your contracts has been extinguished. You no longer have enough power to resurrect.") - return -1 - else - to_chat(owner.current, "You seem to have resurrected without your hellish powers.") - -/datum/devilinfo/proc/check_banishment(mob/living/body) - switch(banish) - if(BANISH_WATER) - if(!QDELETED(body) && iscarbon(body)) - var/mob/living/carbon/H = body - return H.reagents.has_reagent("holy water") - return 0 - if(BANISH_COFFIN) - return (!QDELETED(body) && istype(body.loc, /obj/structure/closet/coffin)) - if(BANISH_FORMALDYHIDE) - if(!QDELETED(body) && iscarbon(body)) - var/mob/living/carbon/H = body - return H.reagents.has_reagent("formaldehyde") - return 0 - if(BANISH_RUNES) - if(!QDELETED(body)) - for(var/obj/effect/decal/cleanable/crayon/R in range(0,body)) - if (R.name == "rune") - return 1 - return 0 - if(BANISH_CANDLES) - if(!QDELETED(body)) - var/count = 0 - for(var/obj/item/candle/C in range(1,body)) - count += C.lit - if(count>=4) - return 1 - return 0 - if(BANISH_DESTRUCTION) - if(!QDELETED(body)) - return 0 - return 1 - if(BANISH_FUNERAL_GARB) - if(!QDELETED(body) && iscarbon(body)) - var/mob/living/carbon/human/H = body - if(H.w_uniform && istype(H.w_uniform, /obj/item/clothing/under/burial)) - return 1 - return 0 - else - for(var/obj/item/clothing/under/burial/B in range(0,body)) - if(B.loc == get_turf(B)) //Make sure it's not in someone's inventory or something. - return 1 - return 0 - -/datum/devilinfo/proc/hellish_resurrection(mob/living/body) - message_admins("[owner.name] (true name is: [truename]) is resurrecting using hellish energy.") - if(SOULVALUE <= ARCH_THRESHOLD && ascendable) // once ascended, arch devils do not go down in power by any means. - reviveNumber += LOSS_PER_DEATH - update_hud() - if(!QDELETED(body)) - body.revive() - if(!body.client) - var/mob/dead/observer/O = owner.get_ghost() - O.reenter_corpse() - if(istype(body.loc, /obj/effect/dummy/slaughter)) - body.forceMove(get_turf(body))//Fixes dying while jaunted leaving you permajaunted. - if(istype(body, /mob/living/carbon/true_devil)) - var/mob/living/carbon/true_devil/D = body - if(D.oldform) - D.oldform.revive() // Heal the old body too, so the devil doesn't resurrect, then immediately regress into a dead body. - if(body.stat == DEAD) // Not sure why this would happen - create_new_body() - else if(GLOB.blobstart.len > 0) - // teleport the body so repeated beatdowns aren't an option) - body.forceMove(get_turf(pick(GLOB.blobstart))) - // give them the devil lawyer outfit in case they got stripped - if(ishuman(body)) - var/mob/living/carbon/human/H = body - H.equipOutfit(/datum/outfit/devil_lawyer) - else - create_new_body() - check_regression() - -/datum/devilinfo/proc/create_new_body() - if(GLOB.blobstart.len > 0) - var/turf/targetturf = get_turf(pick(GLOB.blobstart)) - var/mob/currentMob = owner.current - if(QDELETED(currentMob)) - currentMob = owner.get_ghost() - if(!currentMob) - message_admins("[owner.name]'s devil resurrection failed due to client logoff. Aborting.") - return -1 - if(currentMob.mind != owner) - message_admins("[owner.name]'s devil resurrection failed due to becoming a new mob. Aborting.") - return -1 - var/mob/living/carbon/human/H = new /mob/living/carbon/human(targetturf) - owner.transfer_to(H) - if(isobserver(currentMob)) - var/mob/dead/observer/O = currentMob - O.reenter_corpse() - if(humanform) - H.set_species(humanform.species) - H.dna = humanform.Clone() - - H.dna.UpdateSE() - H.dna.UpdateUI() - - H.sync_organ_dna(1) // It's literally a fresh body as you can get, so all organs properly belong to it - H.UpdateAppearance() - else - // gibbed cyborg or similar - create a randomized "humanform" appearance - H.scramble_appearance() - humanform = H.dna.Clone() - - - H.equipOutfit(/datum/outfit/devil_lawyer) - give_base_spells(TRUE) - if(SOULVALUE >= BLOOD_THRESHOLD) - increase_blood_lizard() - if(SOULVALUE >= TRUE_THRESHOLD) //Yes, BOTH this and the above if statement are to run if soulpower is high enough. - increase_true_devil() - if(SOULVALUE >= ARCH_THRESHOLD && ascendable) - increase_arch_devil() - else - throw EXCEPTION("Unable to find a blobstart landmark for hellish resurrection") - -/datum/devilinfo/proc/update_hud() - if(istype(owner.current, /mob/living/carbon)) - var/mob/living/C = owner.current - if(C.hud_used && C.hud_used.devilsouldisplay) - C.hud_used.devilsouldisplay.update_counter(SOULVALUE) - -// SECTION: Messages and explanations - -/datum/devilinfo/proc/announce_laws(mob/living/owner) - to_chat(owner, "You remember your link to the infernal. You are [truename], an agent of hell, a devil. And you were sent to the plane of creation for a reason. A greater purpose. Convince the crew to sin, and embroiden Hell's grasp.") - to_chat(owner, "However, your infernal form is not without weaknesses.") - to_chat(owner, "You may not use violence to coerce someone into selling their soul.") - to_chat(owner, "You may not directly and knowingly physically harm a devil, other than yourself.") - to_chat(owner,GLOB.lawlorify[LAW][bane]) - to_chat(owner,GLOB.lawlorify[LAW][ban]) - to_chat(owner,GLOB.lawlorify[LAW][obligation]) - to_chat(owner,GLOB.lawlorify[LAW][banish]) - to_chat(owner, "

Remember, the crew can research your weaknesses if they find out your devil name.
") - - -#undef BLOOD_THRESHOLD -#undef TRUE_THRESHOLD -#undef ARCH_THRESHOLD -#undef BASIC_DEVIL -#undef BLOOD_LIZARD -#undef TRUE_DEVIL -#undef ARCH_DEVIL -#undef LOSS_PER_DEATH -#undef SOULVALUE -#undef DEVILRESURRECTTIME - -/datum/outfit/devil_lawyer - name = "Devil Lawyer" - uniform = /obj/item/clothing/under/lawyer/black - shoes = /obj/item/clothing/shoes/laceup - back = /obj/item/storage/backpack - l_hand = /obj/item/storage/briefcase - l_pocket = /obj/item/pen - l_ear = /obj/item/radio/headset - - id = /obj/item/card/id - -/datum/outfit/devil_lawyer/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) - var/obj/item/card/id/W = H.wear_id - if(!istype(W) || W.assignment) // either doesn't have a card, or the card is already written to - return - var/name_to_use = H.real_name - if(H.mind && H.mind.devilinfo) - // Having hell create an ID for you causes its risks - name_to_use = H.mind.devilinfo.truename - - W.name = "[name_to_use]'s ID Card (Lawyer)" - W.registered_name = name_to_use - W.assignment = "Lawyer" - W.rank = W.assignment - W.age = H.age - W.sex = capitalize(H.gender) - W.access = list(ACCESS_MAINT_TUNNELS, ACCESS_SYNDICATE, ACCESS_EXTERNAL_AIRLOCKS) - W.photo = get_id_photo(H) diff --git a/code/game/gamemodes/devil/game_mode.dm b/code/game/gamemodes/devil/game_mode.dm deleted file mode 100644 index 7e9f054faea..00000000000 --- a/code/game/gamemodes/devil/game_mode.dm +++ /dev/null @@ -1,94 +0,0 @@ -/datum/game_mode - var/list/datum/mind/sintouched = list() - var/list/datum/mind/devils = list() - var/devil_ascended = 0 // Number of arch devils on station - -/datum/game_mode/proc/auto_declare_completion_sintouched() - var/text = "" - if(sintouched.len) - text += "
The sintouched were:" - var/list/sintouchedUnique = uniqueList(sintouched) - for(var/S in sintouchedUnique) - var/datum/mind/sintouched_mind = S - text += printplayer(sintouched_mind) - text += printobjectives(sintouched_mind) - text += "
" - text += "
" - to_chat(world,text) - -/datum/game_mode/proc/auto_declare_completion_devils() - var/text = "" - if(devils.len) - text += "
The devils were:" - for(var/D in devils) - var/datum/mind/devil = D - text += printplayer(devil) - text += printdevilinfo(devil) - text += printobjectives(devil) - text += "
" - text += "
" - to_chat(world,text) - - -/datum/game_mode/proc/finalize_devil(datum/mind/devil_mind, ascendable = FALSE) - var/trueName= randomDevilName() - devil_mind.devilinfo = devilInfo(trueName, 1) - devil_mind.devilinfo.ascendable = ascendable - devil_mind.store_memory("Your diabolical true name is [devil_mind.devilinfo.truename]
[GLOB.lawlorify[LAW][devil_mind.devilinfo.ban]]
You may not use violence to coerce someone into selling their soul.
You may not directly and knowingly physically harm a devil, other than yourself.
[GLOB.lawlorify[LAW][devil_mind.devilinfo.bane]]
[GLOB.lawlorify[LAW][devil_mind.devilinfo.obligation]]
[GLOB.lawlorify[LAW][devil_mind.devilinfo.banish]]
") - devil_mind.devilinfo.link_with_mob(devil_mind.current) - if(devil_mind.assigned_role == "Clown") - to_chat(devil_mind.current, "Your infernal nature allows you to wield weapons without harming yourself.") - devil_mind.current.dna.SetSEState(GLOB.clumsyblock, FALSE) - singlemutcheck(devil_mind.current, GLOB.clumsyblock, MUTCHK_FORCED) - var/datum/action/innate/toggle_clumsy/A = new - A.Grant(devil_mind.current) - spawn(10) - devil_mind.devilinfo.update_hud() - if(issilicon(devil_mind.current)) - var/mob/living/silicon/S = devil_mind.current - S.laws.set_sixsixsix_law("You may not use violence to coerce someone into selling their soul.") - S.laws.set_sixsixsix_law("You may not directly and knowingly physically harm a devil, other than yourself.") - S.laws.set_sixsixsix_law("[GLOB.lawlorify[LAW][devil_mind.devilinfo.ban]]") - S.laws.set_sixsixsix_law("[GLOB.lawlorify[LAW][devil_mind.devilinfo.obligation]]") - S.laws.set_sixsixsix_law("Accomplish your objectives at all costs.") - -// unsure about the second "quantity" arg and how it fits with the antag refactor -/datum/game_mode/proc/forge_devil_objectives(datum/mind/devil_mind, quantity) - var/list/validtypes = list(/datum/objective/devil/soulquantity, /datum/objective/devil/soulquality, /datum/objective/devil/sintouch, /datum/objective/devil/buy_target) - for(var/i = 1 to quantity) - var/type = pick(validtypes) - var/datum/objective/devil/objective = new type(null) - objective.owner = devil_mind - devil_mind.objectives += objective - if(!istype(objective, /datum/objective/devil/buy_target)) - validtypes -= type //prevent duplicate objectives, EXCEPT for buy_target. - else - objective.find_target() - -/datum/game_mode/proc/greet_devil(datum/mind/devil_mind) - if(!devil_mind.devilinfo) - return - devil_mind.devilinfo.announce_laws(devil_mind.current) - devil_mind.announce_objectives() - - -/datum/game_mode/proc/printdevilinfo(datum/mind/ply) - if(!ply.devilinfo) - return "Target is not a devil." - var/text = "
The devil's true name is: [ply.devilinfo.truename]
" - text += "The devil's bans were:
" - text += " [GLOB.lawlorify[LORE][ply.devilinfo.ban]]
" - text += " [GLOB.lawlorify[LORE][ply.devilinfo.bane]]
" - text += " [GLOB.lawlorify[LORE][ply.devilinfo.obligation]]
" - text += " [GLOB.lawlorify[LORE][ply.devilinfo.banish]]

" - return text - -/datum/game_mode/proc/update_devil_icons_added(datum/mind/devil_mind) - var/datum/atom_hud/antag/hud = GLOB.huds[ANTAG_HUD_DEVIL] - hud.join_hud(devil_mind.current) - set_antag_hud(devil_mind.current, "huddevil") - -/datum/game_mode/proc/update_devil_icons_removed(datum/mind/devil_mind) - var/datum/atom_hud/antag/hud = GLOB.huds[ANTAG_HUD_DEVIL] - hud.leave_hud(devil_mind.current) - set_antag_hud(devil_mind.current, null) diff --git a/code/game/gamemodes/devil/imp/imp.dm b/code/game/gamemodes/devil/imp/imp.dm deleted file mode 100644 index e863eaf1f6a..00000000000 --- a/code/game/gamemodes/devil/imp/imp.dm +++ /dev/null @@ -1,54 +0,0 @@ -//////////////////The Monster - -/mob/living/simple_animal/imp - name = "imp" - real_name = "imp" - desc = "A large, menacing creature covered in armored black scales." - speak_emote = list("cackles") - emote_hear = list("cackles","screeches") - response_help = "thinks better of touching" - response_disarm = "flails at" - response_harm = "punches" - icon = 'icons/mob/mob.dmi' - icon_state = "imp" - icon_living = "imp" - speed = 1 - a_intent = INTENT_HARM - stop_automated_movement = 1 - status_flags = CANPUSH - attack_sound = 'sound/misc/demon_attack1.ogg' - atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) - minbodytemp = 250 //Weak to cold - maxbodytemp = INFINITY - faction = list("hell") - attacktext = "wildly tears into" - maxHealth = 200 - health = 200 - healable = 0 - environment_smash = 1 - melee_damage_lower = 10 - melee_damage_upper = 15 - see_in_dark = 8 - lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE - var/boost - var/playstyle_string = "You are an imp, a mischevious creature from hell. You are the lowest rank on the hellish totem pole \ - Though you are not obligated to help, perhaps by aiding a higher ranking devil, you might just get a promotion. However, you are incapable \ - of intentionally harming a fellow devil." - -/mob/living/simple_animal/imp/New() - ..() - boost = world.time + 60 - -/mob/living/simple_animal/imp/Life() - ..() - if(boost[src] screams in agony as it sublimates into a sulfurous smoke.
") - ghostize() - qdel(src) diff --git a/code/game/gamemodes/devil/objectives.dm b/code/game/gamemodes/devil/objectives.dm deleted file mode 100644 index 04d0217b599..00000000000 --- a/code/game/gamemodes/devil/objectives.dm +++ /dev/null @@ -1,109 +0,0 @@ -/datum/objective/devil - -/datum/objective/devil/soulquantity - explanation_text = "You shouldn't see this text. Error:DEVIL1" - target_amount = 4 - -/datum/objective/devil/soulquantity/New() - target_amount = pick(6, 7, 8) - update_explanation_text() - -/datum/objective/devil/proc/update_explanation_text() - //Intentionally empty - -/datum/objective/devil/soulquantity/update_explanation_text() - explanation_text = "Purchase, and retain control over at least [target_amount] souls." - -/datum/objective/devil/soulquantity/check_completion() - var/count = 0 - for(var/S in owner.devilinfo.soulsOwned) - var/datum/mind/L = S - if(L.soulOwner == owner) - count++ - return count >= target_amount - - - -/datum/objective/devil/soulquality - explanation_text = "You shouldn't see this text. Error:DEVIL2" - var/contractType - var/contractName - -/datum/objective/devil/soulquality/New() - contractType = pick(CONTRACT_POWER, CONTRACT_WEALTH, CONTRACT_PRESTIGE, CONTRACT_MAGIC, CONTRACT_REVIVE, CONTRACT_KNOWLEDGE) - target_amount = pick(1, 2) - switch(contractType) - if(CONTRACT_POWER) - contractName = "for power" - if(CONTRACT_WEALTH) - contractName = "for wealth" - if(CONTRACT_PRESTIGE) - contractName = "for prestige" - if(CONTRACT_MAGIC) - contractName = "for magic" - if(CONTRACT_REVIVE) - contractName = "of revival" - if(CONTRACT_KNOWLEDGE) - contractName = "for knowledge" - update_explanation_text() - -/datum/objective/devil/soulquality/update_explanation_text() - explanation_text = "Have mortals sign at least [target_amount] contracts [contractName]." - -/datum/objective/devil/soulquality/check_completion() - var/count = 0 - for(var/S in owner.devilinfo.soulsOwned) - var/datum/mind/L = S - if(L.soulOwner != L && L.damnation_type == contractType) - count++ - return count >= target_amount - - - -/datum/objective/devil/sintouch - explanation_text = "You shouldn't see this text. Error:DEVIL3" - -/datum/objective/devil/sintouch/New() - target_amount = pick(4, 5) - explanation_text = "Ensure at least [target_amount] mortals are sintouched." - -/datum/objective/devil/sintouch/check_completion() - return target_amount <= SSticker.mode.sintouched.len - - - -/datum/objective/devil/buy_target - explanation_text = "You shouldn't see this text. Error:DEVIL4" - -/datum/objective/devil/buy_target/New() - find_target() - update_explanation_text() - -/datum/objective/devil/buy_target/update_explanation_text() - if(target) - explanation_text = "Purchase and retain the soul of [target.name], the [target.assigned_role]." - else - explanation_text = "Free objective." - -/datum/objective/devil/buy_target/check_completion() - return target.soulOwner == owner - - -/datum/objective/devil/outsell - explanation_text = "You shouldn't see this text. Error:DEVIL5" - -/datum/objective/devil/outsell/update_explanation_text() - explanation_text = "Purchase and retain control over more souls than [target.devilinfo.truename], known to mortals as [target.name], the [target.assigned_role]." - -/datum/objective/devil/outsell/check_completion() - var/selfcount = 0 - for(var/S in owner.devilinfo.soulsOwned) - var/datum/mind/L = S - if(L.soulOwner == owner) - selfcount++ - var/targetcount = 0 - for(var/S in target.devilinfo.soulsOwned) - var/datum/mind/L = S - if(L.soulOwner == target) - targetcount++ - return selfcount > targetcount diff --git a/code/game/gamemodes/devil/true_devil/_true_devil.dm b/code/game/gamemodes/devil/true_devil/_true_devil.dm deleted file mode 100644 index 197524c0e38..00000000000 --- a/code/game/gamemodes/devil/true_devil/_true_devil.dm +++ /dev/null @@ -1,218 +0,0 @@ -#define DEVIL_R_HAND_LAYER 1 -#define DEVIL_L_HAND_LAYER 2 -#define DEVIL_TOTAL_LAYERS 2 - -// This is used primarily for having hands. -/mob/living/carbon/true_devil - name = "True Devil" - desc = "A pile of infernal energy, taking a vaguely humanoid form." - icon = 'icons/mob/32x64.dmi' - icon_state = "true_devil" - gender = NEUTER - health = 350 - maxHealth = 350 - ventcrawler = FALSE - density = TRUE - pass_flags = 0 - var/ascended = FALSE - sight = (SEE_TURFS | SEE_OBJS) - status_flags = CANPUSH - universal_understand = TRUE - universal_speak = TRUE //The devil speaks all languages meme - var/mob/living/oldform - var/list/devil_overlays[DEVIL_TOTAL_LAYERS] - -/mob/living/carbon/true_devil/New(loc, mob/living/carbon/dna_source) - dna = dna_source.dna.Clone() - var/obj/item/organ/internal/brain/B = new(src) - var/obj/item/organ/internal/ears/E = new(src) - B.insert() - E.insert() - ..() - -// inventory system could use some love -/mob/living/carbon/true_devil/put_in_hands(obj/item/W) - if(!W) - return 0 - if(put_in_active_hand(W)) - return TRUE - else if(put_in_inactive_hand(W)) - return TRUE - else - ..() - -/mob/living/carbon/true_devil/proc/convert_to_archdevil() - maxHealth = 5000 // not an IMPOSSIBLE amount, but still near impossible. - ascended = TRUE - health = maxHealth - icon_state = "arch_devil" - -/mob/living/carbon/true_devil/proc/set_name() - name = mind.devilinfo.truename - real_name = name - -/mob/living/carbon/true_devil/Login() - ..() - if(mind.devilinfo) - mind.devilinfo.announce_laws(src) - mind.announce_objectives() - - -/mob/living/carbon/true_devil/death(gibbed) - . = ..(gibbed) - drop_l_hand() - drop_r_hand() - - -/mob/living/carbon/true_devil/examine(mob/user) - var/msg = "*---------*\nThis is [bicon(src)] [src]!\n" - - //Left hand items - if(l_hand && !(l_hand.flags & ABSTRACT)) - if(l_hand.blood_DNA) - msg += "It is holding [bicon(l_hand)] [l_hand.gender == PLURAL? "some" : "a"] blood-stained [l_hand.name] in its left hand!\n" - else - msg += "It is holding [bicon(l_hand)] \a [l_hand] in its left hand.\n" - - //Right hand items - if(r_hand && !(r_hand.flags & ABSTRACT)) - if(r_hand.blood_DNA) - msg += "It is holding [bicon(r_hand)] [r_hand.gender == PLURAL? "some" : "a"] blood-stained [r_hand.name] in its right hand!\n" - else - msg += "It is holding [bicon(r_hand)] \a [r_hand] in its right hand.\n" - - //Braindead - if(!client && stat != DEAD) - msg += "The devil seems to be in deep contemplation.\n" - - //Damaged - if(stat == DEAD) - msg += "The hellfire seems to have been extinguished, for now at least.\n" - else if(health < (maxHealth/10)) - msg += "You can see hellfire inside of it's gaping wounds.\n" - else if(health < (maxHealth/2)) - msg += "You can see hellfire inside of it's wounds.\n" - msg += "*---------*" - . = list(msg) - - -/mob/living/carbon/true_devil/IsAdvancedToolUser() - return TRUE - -/mob/living/carbon/true_devil/assess_threat() - return 666 - -/mob/living/carbon/true_devil/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0) - if(mind && has_bane(BANE_LIGHT)) - mind.disrupt_spells(-500) - return ..() //flashes don't stop devils UNLESS it's their bane. - - -/mob/living/carbon/true_devil/attacked_by(obj/item/I, mob/living/user, def_zone) - var/weakness = check_weakness(I, user) - apply_damage(I.force * weakness, I.damtype, def_zone) - var/message_verb = "" - if(I.attack_verb && I.attack_verb.len) - message_verb = "[pick(I.attack_verb)]" - else if(I.force) - message_verb = "attacked" - - var/attack_message = "[src] has been [message_verb] with [I]." - if(user) - user.do_attack_animation(src) - if(user in viewers(src, null)) - attack_message = "[user] has [message_verb] [src] with [I]!" - if(message_verb) - visible_message("[attack_message]", - "[attack_message]") - return TRUE - -/mob/living/carbon/true_devil/UnarmedAttack(atom/A, proximity) - if(!ishuman(A)) - // `attack_hand` on mobs assumes the attacker is a human - // I am the worst - A.attack_hand(src) - // If the devil wants to actually attack, they have the pitchfork. - - -/mob/living/carbon/true_devil/Process_Spacemove(movement_dir = 0) - return TRUE - -/mob/living/carbon/true_devil/singularity_act() - if(ascended) - return 0 - return ..() - -/mob/living/carbon/true_devil/attack_ghost(mob/dead/observer/user as mob) - if(ascended || user.mind.soulOwner == src.mind) - var/mob/living/simple_animal/imp/S = new(get_turf(loc)) - S.key = user.key - S.mind.assigned_role = "MODE" - S.mind.special_role = "Imp" - var/datum/objective/newobjective = new - newobjective.explanation_text = "Try to get a promotion to a higher infernal rank." - S.mind.objectives += newobjective - to_chat(S,S.playstyle_string) - to_chat(S,"Objective #1: [newobjective.explanation_text]") - return - else - return ..() - -/mob/living/carbon/true_devil/resist_fire() - //They're immune to fire. - -/mob/living/carbon/true_devil/attack_hand(mob/living/carbon/human/M) - if(..()) - switch(M.a_intent) - if(INTENT_HARM) - var/damage = rand(1, 5) - playsound(loc, "punch", 25, 1, -1) - visible_message("[M] has punched [src]!", \ - "[M] has punched [src]!") - adjustBruteLoss(damage) - add_attack_logs(M, src, "attacked") - updatehealth() - if(INTENT_DISARM) - if(!lying && !ascended) //No stealing the arch devil's pitchfork. - if(prob(5)) - // Weaken knocks people over - // Paralyse knocks people out - // It's Paralyse for parity though - // Weaken(2) - Paralyse(2) - playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - add_attack_logs(M, src, "pushed") - visible_message("[M] has pushed down [src]!", \ - "[M] has pushed down [src]!") - else - if(prob(25)) - drop_item() - playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - visible_message("[M] has disarmed [src]!", \ - "[M] has disarmed [src]!") - else - playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1) - visible_message("[M] has attempted to disarm [src]!") - -/mob/living/carbon/true_devil/handle_breathing() - // devils do not need to breathe - -/mob/living/carbon/true_devil/is_literate() - return TRUE - -/mob/living/carbon/true_devil/ex_act(severity, ex_target) - if(!ascended) - var/b_loss - switch (severity) - if (1) - b_loss = 500 - if (2) - b_loss = 150 - if(3) - b_loss = 30 - if(has_bane(BANE_LIGHT)) - b_loss *=2 - adjustBruteLoss(b_loss) - return ..() - -#undef DEVIL_TOTAL_LAYERS diff --git a/code/game/gamemodes/devil/true_devil/inventory.dm b/code/game/gamemodes/devil/true_devil/inventory.dm deleted file mode 100644 index 7b6d6fb3013..00000000000 --- a/code/game/gamemodes/devil/true_devil/inventory.dm +++ /dev/null @@ -1,50 +0,0 @@ -/mob/living/carbon/true_devil/unEquip(obj/item/I, force, silent = FALSE) - if(..()) - update_inv_r_hand() - update_inv_l_hand() - return 1 - return 0 - -/mob/living/carbon/true_devil/update_inv_r_hand() - ..() - if(r_hand) - var/t_state = r_hand.item_state - if(!t_state) - t_state = r_hand.icon_state - - var/image/I = image("icon" = r_hand.righthand_file, "icon_state" = "[t_state]") - I = center_image(I, r_hand.inhand_x_dimension, r_hand.inhand_y_dimension) - devil_overlays[DEVIL_R_HAND_LAYER] = I - else - devil_overlays[DEVIL_R_HAND_LAYER] = null - update_icons() - - -/mob/living/carbon/true_devil/update_inv_l_hand() - ..() - if(l_hand) - var/t_state = l_hand.item_state - if(!t_state) - t_state = l_hand.icon_state - - var/image/I = image("icon" = l_hand.lefthand_file, "icon_state" = "[t_state]") - I = center_image(I, l_hand.inhand_x_dimension, l_hand.inhand_y_dimension) - devil_overlays[DEVIL_L_HAND_LAYER] = I - else - devil_overlays[DEVIL_L_HAND_LAYER] = null - update_icons() - -/mob/living/carbon/true_devil/proc/remove_overlay(cache_index) - if(devil_overlays[cache_index]) - overlays -= devil_overlays[cache_index] - devil_overlays[cache_index] = null - - -/mob/living/carbon/true_devil/proc/apply_overlay(cache_index) - var/image/I = devil_overlays[cache_index] - if(I) - if(I in overlays) - return - var/list/new_overlays = overlays.Copy() - new_overlays += I - overlays = new_overlays diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 4f150975322..343f8bf27ae 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -227,7 +227,7 @@ /datum/game_mode/proc/check_win() //universal trigger to be called at mob death, nuke explosion, etc. To be called from everywhere. return 0 -/datum/game_mode/proc/get_players_for_role(var/role, override_jobbans=0) +/datum/game_mode/proc/get_players_for_role(role, override_jobbans=0) var/list/players = list() var/list/candidates = list() //var/list/drafted = list() @@ -276,10 +276,10 @@ // Less if there are not enough valid players in the game entirely to make recommended_enemies. -/datum/game_mode/proc/latespawn(var/mob) +/datum/game_mode/proc/latespawn(mob) /* -/datum/game_mode/proc/check_player_role_pref(var/role, var/mob/player) +/datum/game_mode/proc/check_player_role_pref(role, mob/player) if(player.preferences.be_special & role) return 1 return 0 @@ -406,7 +406,7 @@ to_chat(M, msg) //Announces objectives/generic antag text. -/proc/show_generic_antag_text(var/datum/mind/player) +/proc/show_generic_antag_text(datum/mind/player) if(player.current) to_chat(player.current, "You are an antagonist! Within the rules, \ try to act as an opposing force to the crew. Further RP and try to make sure \ @@ -415,7 +415,7 @@ Think through your actions and make the roleplay immersive! Please remember all \ rules aside from those without explicit exceptions apply to antagonists.") -/proc/show_objectives(var/datum/mind/player) +/proc/show_objectives(datum/mind/player) if(!player || !player.current) return var/obj_count = 1 @@ -424,7 +424,7 @@ to_chat(player.current, "Objective #[obj_count]: [objective.explanation_text]") obj_count++ -/proc/get_roletext(var/role) +/proc/get_roletext(role) return role /proc/get_nuke_code() diff --git a/code/game/gamemodes/heist/heist.dm b/code/game/gamemodes/heist/heist.dm index 54faf90fef8..4277fc76916 100644 --- a/code/game/gamemodes/heist/heist.dm +++ b/code/game/gamemodes/heist/heist.dm @@ -83,7 +83,7 @@ GLOBAL_LIST_EMPTY(cortical_stacks) //Stacks for 'leave nobody behind' objective. return ..() -/datum/game_mode/proc/create_vox(var/datum/mind/newraider) +/datum/game_mode/proc/create_vox(datum/mind/newraider) var/sounds = rand(2,8) var/i = 0 @@ -175,7 +175,7 @@ GLOBAL_LIST_EMPTY(cortical_stacks) //Stacks for 'leave nobody behind' objective. return objs -/datum/game_mode/proc/greet_vox(var/datum/mind/raider) +/datum/game_mode/proc/greet_vox(datum/mind/raider) to_chat(raider.current, "You are a Vox Raider, fresh from the Shoal!") to_chat(raider.current, "The Vox are a race of cunning, sharp-eyed nomadic raiders and traders endemic to the frontier and much of the unexplored galaxy. You and the crew have come to the [station_name()] for plunder, trade or both.") to_chat(raider.current, "Vox are cowardly and will flee from larger groups, but corner one or find them en masse and they are vicious.") diff --git a/code/game/gamemodes/intercept_report.dm b/code/game/gamemodes/intercept_report.dm index acee798e96c..aaf5dd1eea7 100644 --- a/code/game/gamemodes/intercept_report.dm +++ b/code/game/gamemodes/intercept_report.dm @@ -55,7 +55,7 @@ ) -/datum/intercept_text/proc/build(var/mode_type, datum/mind/correct_person) +/datum/intercept_text/proc/build(mode_type, datum/mind/correct_person) switch(mode_type) if("revolution") src.text = "" diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index 7c5d350436b..d156c97266b 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -18,11 +18,11 @@ GLOBAL_LIST_INIT(meteors_ops, list(/obj/effect/meteor/goreops)) //Meaty Ops /////////////////////////////// //Meteor spawning global procs /////////////////////////////// -/proc/spawn_meteors(var/number = 10, var/list/meteortypes) +/proc/spawn_meteors(number = 10, list/meteortypes) for(var/i = 0; i < number; i++) spawn_meteor(meteortypes) -/proc/spawn_meteor(var/list/meteortypes) +/proc/spawn_meteor(list/meteortypes) var/turf/pickedstart var/turf/pickedgoal var/max_i = 10//number of tries to spawn meteor. @@ -136,7 +136,7 @@ GLOBAL_LIST_INIT(meteors_ops, list(/obj/effect/meteor/goreops)) //Meaty Ops /obj/effect/meteor/CanPass(atom/movable/mover, turf/target, height=0) return istype(mover, /obj/effect/meteor) ? 1 : ..() -/obj/effect/meteor/proc/ram_turf(var/turf/T) +/obj/effect/meteor/proc/ram_turf(turf/T) //first bust whatever is in the turf for(var/atom/A in T) if(A != src) @@ -170,7 +170,7 @@ GLOBAL_LIST_INIT(meteors_ops, list(/obj/effect/meteor/goreops)) //Meaty Ops var/obj/item/O = new meteordrop(get_turf(src)) O.throw_at(dest, 5, 10) -/obj/effect/meteor/proc/meteor_effect(var/sound=1) +/obj/effect/meteor/proc/meteor_effect(sound=1) if(sound) var/sound/meteor_sound = sound(meteorsound) var/random_frequency = get_rand_frequency() diff --git a/code/game/gamemodes/miniantags/abduction/gland.dm b/code/game/gamemodes/miniantags/abduction/gland.dm index 53c550daf01..021c4e09f06 100644 --- a/code/game/gamemodes/miniantags/abduction/gland.dm +++ b/code/game/gamemodes/miniantags/abduction/gland.dm @@ -68,7 +68,7 @@ active_mind_control = FALSE update_gland_hud() -/obj/item/organ/internal/heart/gland/remove(var/mob/living/carbon/M, special = 0) +/obj/item/organ/internal/heart/gland/remove(mob/living/carbon/M, special = 0) active = 0 if(initial(uses) == 1) uses = initial(uses) @@ -77,7 +77,7 @@ clear_mind_control() . = ..() -/obj/item/organ/internal/heart/gland/insert(var/mob/living/carbon/M, special = 0) +/obj/item/organ/internal/heart/gland/insert(mob/living/carbon/M, special = 0) ..() if(special != 2 && uses) // Special 2 means abductor surgery Start() diff --git a/code/game/gamemodes/miniantags/borer/borer.dm b/code/game/gamemodes/miniantags/borer/borer.dm index 750473b1dfa..a0dcd826972 100644 --- a/code/game/gamemodes/miniantags/borer/borer.dm +++ b/code/game/gamemodes/miniantags/borer/borer.dm @@ -25,7 +25,7 @@ if(M.mind && isobserver(M)) to_chat(M, "Thought-speech, [src] -> [B.truename]: [message]") -/mob/living/captive_brain/say_understands(var/mob/other, var/datum/language/speaking = null) +/mob/living/captive_brain/say_understands(mob/other, datum/language/speaking = null) var/mob/living/simple_animal/borer/B = loc if(!istype(B)) log_runtime(EXCEPTION("Trapped mind found without a borer!"), src) @@ -114,7 +114,7 @@ var/datum/action/innate/borer/freeze_victim/freeze_victim_action = new var/datum/action/innate/borer/torment/torment_action = new -/mob/living/simple_animal/borer/New(atom/newloc, var/gen=1) +/mob/living/simple_animal/borer/New(atom/newloc, gen=1) ..(newloc) remove_from_all_data_huds() generation = gen @@ -151,7 +151,7 @@ if(client.statpanel == "Status") stat("Chemicals", chemicals) -/mob/living/simple_animal/borer/say(var/message) +/mob/living/simple_animal/borer/say(message) var/list/message_pieces = parse_languages(message) for(var/datum/multilingual_say_piece/S in message_pieces) if(!istype(S.speaking, /datum/language/corticalborer) && loc == host && !talk_inside_host) @@ -823,7 +823,7 @@ /mob/living/simple_animal/borer/can_use_vents() return -/mob/living/simple_animal/borer/proc/transfer_personality(var/client/candidate) +/mob/living/simple_animal/borer/proc/transfer_personality(client/candidate) if(!candidate || !candidate.mob) return diff --git a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm index e2747ebb532..c434f130fd4 100644 --- a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm +++ b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm @@ -489,7 +489,7 @@ changeNext_move(CLICK_CD_MELEE) target.ex_act(EXPLODE_LIGHT) -/mob/living/simple_animal/hostile/swarmer/proc/DisperseTarget(var/mob/living/target) +/mob/living/simple_animal/hostile/swarmer/proc/DisperseTarget(mob/living/target) if(target == src) return @@ -605,7 +605,7 @@ max_integrity = 10 density = FALSE -/obj/structure/swarmer/trap/Crossed(var/atom/movable/AM, oldloc) +/obj/structure/swarmer/trap/Crossed(atom/movable/AM, oldloc) if(isliving(AM)) var/mob/living/L = AM if(!istype(L, /mob/living/simple_animal/hostile/swarmer)) diff --git a/code/game/gamemodes/miniantags/guardian/types/bomb.dm b/code/game/gamemodes/miniantags/guardian/types/bomb.dm index cf709cb1767..67b99d91968 100644 --- a/code/game/gamemodes/miniantags/guardian/types/bomb.dm +++ b/code/game/gamemodes/miniantags/guardian/types/bomb.dm @@ -42,7 +42,7 @@ var/mob/living/spawner -/obj/item/guardian_bomb/proc/disguise(var/obj/A) +/obj/item/guardian_bomb/proc/disguise(obj/A) A.forceMove(src) stored_obj = A opacity = A.opacity @@ -60,7 +60,7 @@ to_chat(spawner, "Failure! Your trap on [stored_obj] didn't catch anyone this time.") qdel(src) -/obj/item/guardian_bomb/proc/detonate(var/mob/living/user) +/obj/item/guardian_bomb/proc/detonate(mob/living/user) if(!istype(user)) return to_chat(user, "The [src] was boobytrapped!") diff --git a/code/game/gamemodes/miniantags/morph/morph.dm b/code/game/gamemodes/miniantags/morph/morph.dm index a122351a4bb..6e3627f2684 100644 --- a/code/game/gamemodes/miniantags/morph/morph.dm +++ b/code/game/gamemodes/miniantags/morph/morph.dm @@ -152,7 +152,7 @@ /mob/living/simple_animal/hostile/morph/LoseAggro() vision_range = initial(vision_range) -/mob/living/simple_animal/hostile/morph/AIShouldSleep(var/list/possible_targets) +/mob/living/simple_animal/hostile/morph/AIShouldSleep(list/possible_targets) . = ..() if(.) var/list/things = list() diff --git a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm index fc49a534f2c..0c4bfc48f33 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm @@ -1,5 +1,5 @@ ///Harvest -/mob/living/simple_animal/revenant/ClickOn(var/atom/A, var/params) //Copypaste from ghost code - revenants can't interact with the world directly. +/mob/living/simple_animal/revenant/ClickOn(atom/A, params) //Copypaste from ghost code - revenants can't interact with the world directly. if(client.click_intercept) client.click_intercept.InterceptClickOn(src, params, A) diff --git a/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm b/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm index 6871e87c3ba..40f6ac3398c 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm @@ -4,7 +4,7 @@ var/key_of_revenant -/datum/event/revenant/proc/get_revenant(var/end_if_fail = 0) +/datum/event/revenant/proc/get_revenant(end_if_fail = 0) var/deadMobs = 0 for(var/mob/M in GLOB.dead_mob_list) deadMobs++ diff --git a/code/game/gamemodes/miniantags/sintouched/objectives.dm b/code/game/gamemodes/miniantags/sintouched/objectives.dm deleted file mode 100644 index 04e0e3266f0..00000000000 --- a/code/game/gamemodes/miniantags/sintouched/objectives.dm +++ /dev/null @@ -1,34 +0,0 @@ -/datum/objective/sintouched - completed = 1 - -/* NO ERP OBJECTIVE FOR YOU. -/datum/objective/sintouched/lust - dangerrating = 3 // it's not AS dangerous. - -/datum/objective/sintouched/lust/New() - var/mob/dead/D = pick(dead_mob_list) - if(prob(50) && D) - explanation_text = "You know that [D] has perished.... and you think [D] is kinda cute. Make sure everyone knows how HOT [D]'s lifeless body is." - else - explanation_text = "Go get married, then immediately cheat on your new spouse." */ - -/datum/objective/sintouched/gluttony - explanation_text = "Food is delicious, so delicious you can't let it be wasted on other people." - -/datum/objective/sintouched/greed - explanation_text = "You want MORE, more money, more wealth, more riches. Go get it, but don't hurt people for it." - -/datum/objective/sintouched/sloth - explanation_text = "You just get tired randomly. Go take a nap at a time that would inconvenience other people." - -/datum/objective/sintouched/wrath - explanation_text = "What have your coworkers ever done for you? Don't offer to help them in any matter, and refuse if asked." - -/datum/objective/sintouched/envy - explanation_text = "Why should you be stuck with your rank? Show everyone you can do other jobs too, and don't let anyone stop you, least of all because you have no training." - -/datum/objective/sintouched/pride - explanation_text = "You are the BEST thing on the station. Make sure everyone knows it." - -/datum/objective/sintouched/acedia - explanation_text = "Angels, devils, good, evil... who cares? Just ignore any hellish threats and do your job." diff --git a/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm b/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm index ed0a4a908ed..f5311010707 100644 --- a/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm +++ b/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm @@ -2,7 +2,7 @@ #define BLOODCRAWL 1 #define BLOODCRAWL_EAT 2 -/mob/living/proc/phaseout(var/obj/effect/decal/cleanable/B) +/mob/living/proc/phaseout(obj/effect/decal/cleanable/B) if(iscarbon(src)) var/mob/living/carbon/C = src @@ -105,7 +105,7 @@ icon = 'icons/effects/blood.dmi' flags = NODROP|ABSTRACT -/mob/living/proc/phasein(var/obj/effect/decal/cleanable/B) +/mob/living/proc/phasein(obj/effect/decal/cleanable/B) if(notransform) to_chat(src, "Finish eating first!") diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index a1dbbf35644..11b49f225bf 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -186,7 +186,7 @@ M.regenerate_icons() M.update_body() -/datum/game_mode/proc/prepare_syndicate_leader(var/datum/mind/synd_mind, var/nuke_code) +/datum/game_mode/proc/prepare_syndicate_leader(datum/mind/synd_mind, nuke_code) var/leader_title = pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord") synd_mind.current.real_name = "[syndicate_name()] Team [leader_title]" to_chat(synd_mind.current, "You are the Syndicate leader for this mission. You are responsible for the distribution of telecrystals and your ID is the only one who can open the launch bay doors.") @@ -219,7 +219,7 @@ else nuke_code = "code will be provided later" -/datum/game_mode/proc/update_syndicate_id(var/datum/mind/synd_mind, is_leader = FALSE) +/datum/game_mode/proc/update_syndicate_id(datum/mind/synd_mind, is_leader = FALSE) var/list/found_ids = synd_mind.current.search_contents_for(/obj/item/card/id) if(LAZYLEN(found_ids)) @@ -231,13 +231,13 @@ else message_admins("Warning: Operative [key_name_admin(synd_mind.current)] spawned without an ID card!") -/datum/game_mode/proc/forge_syndicate_objectives(var/datum/mind/syndicate) +/datum/game_mode/proc/forge_syndicate_objectives(datum/mind/syndicate) var/datum/objective/nuclear/syndobj = new syndobj.owner = syndicate syndicate.objectives += syndobj -/datum/game_mode/proc/greet_syndicate(var/datum/mind/syndicate, var/you_are=1) +/datum/game_mode/proc/greet_syndicate(datum/mind/syndicate, you_are=1) SEND_SOUND(syndicate.current, sound('sound/ambience/antag/ops.ogg')) if(you_are) to_chat(syndicate.current, "You are a [syndicate_name()] agent!") @@ -418,7 +418,7 @@ to_chat(world, text) return 1 -/proc/nukelastname(var/mob/M as mob) //--All praise goes to NEO|Phyte, all blame goes to DH, and it was Cindi-Kate's idea. Also praise Urist for copypasta ho. +/proc/nukelastname(mob/M as mob) //--All praise goes to NEO|Phyte, all blame goes to DH, and it was Cindi-Kate's idea. Also praise Urist for copypasta ho. var/randomname = pick(GLOB.last_names) var/newname = sanitize(copytext(input(M,"You are the nuke operative [pick("Czar", "Boss", "Commander", "Chief", "Kingpin", "Director", "Overlord")]. Please choose a last name for your family.", "Name change",randomname),1,MAX_NAME_LEN)) diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index f57da2eabaf..a1f214fa4a1 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -210,7 +210,7 @@ GLOBAL_VAR(bomb_set) data["codemsg"] = "-----" return data -/obj/machinery/nuclearbomb/proc/is_auth(var/mob/user) +/obj/machinery/nuclearbomb/proc/is_auth(mob/user) if(auth) return TRUE else if(user.can_admin_interact()) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index ef3da7d5b8d..9837b1ea896 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -431,7 +431,7 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective) /datum/objective/steal/exchange martyr_compatible = 0 -/datum/objective/steal/exchange/proc/set_faction(var/faction,var/otheragent) +/datum/objective/steal/exchange/proc/set_faction(faction, otheragent) target = otheragent var/datum/theft_objective/unique/targetinfo if(faction == "red") @@ -442,7 +442,7 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective) steal_target = targetinfo /datum/objective/steal/exchange/backstab -/datum/objective/steal/exchange/backstab/set_faction(var/faction) +/datum/objective/steal/exchange/backstab/set_faction(faction) var/datum/theft_objective/unique/targetinfo if(faction == "red") targetinfo = new /datum/theft_objective/unique/docs_red @@ -477,7 +477,7 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective) /datum/objective/absorb -/datum/objective/absorb/proc/gen_amount_goal(var/lowbound = 4, var/highbound = 6) +/datum/objective/absorb/proc/gen_amount_goal(lowbound = 4, highbound = 6) target_amount = rand (lowbound,highbound) if(SSticker) var/n_p = 1 //autowin diff --git a/code/game/gamemodes/setupgame.dm b/code/game/gamemodes/setupgame.dm index 75825a12259..9ce71866e88 100644 --- a/code/game/gamemodes/setupgame.dm +++ b/code/game/gamemodes/setupgame.dm @@ -1,4 +1,4 @@ -/proc/getAssignedBlock(var/name,var/list/blocksLeft, var/activity_bounds=DNA_DEFAULT_BOUNDS, var/good=0) +/proc/getAssignedBlock(name, list/blocksLeft, activity_bounds=DNA_DEFAULT_BOUNDS, good=0) if(blocksLeft.len==0) warning("[name]: No more blocks left to assign!") return 0 diff --git a/code/game/gamemodes/shadowling/ascendant_shadowling.dm b/code/game/gamemodes/shadowling/ascendant_shadowling.dm index 9eeadeaba0f..e4f6f7de4ab 100644 --- a/code/game/gamemodes/shadowling/ascendant_shadowling.dm +++ b/code/game/gamemodes/shadowling/ascendant_shadowling.dm @@ -38,7 +38,7 @@ icon_state = "NurnKal" icon_living = "NurnKal" -/mob/living/simple_animal/ascendant_shadowling/Process_Spacemove(var/movement_dir = 0) +/mob/living/simple_animal/ascendant_shadowling/Process_Spacemove(movement_dir = 0) return 1 //copypasta from carp code /mob/living/simple_animal/ascendant_shadowling/ex_act(severity) @@ -47,7 +47,7 @@ /mob/living/simple_animal/ascendant_shadowling/singularity_act() return 0 //Well hi, fellow god! How are you today? -/mob/living/simple_animal/ascendant_shadowling/proc/announce(var/text, var/size = 4, var/new_sound = null) +/mob/living/simple_animal/ascendant_shadowling/proc/announce(text, size = 4, new_sound = null) var/message = "\"[text]\"" for(var/mob/M in GLOB.player_list) if(!isnewplayer(M) && M.client) diff --git a/code/game/gamemodes/shadowling/shadowling.dm b/code/game/gamemodes/shadowling/shadowling.dm index 2ed440f366d..a017b6d9af0 100644 --- a/code/game/gamemodes/shadowling/shadowling.dm +++ b/code/game/gamemodes/shadowling/shadowling.dm @@ -55,15 +55,15 @@ Made by Xhuis var/victory_warning_announced = FALSE var/thrall_ratio = 1 -/proc/is_thrall(var/mob/living/M) +/proc/is_thrall(mob/living/M) return istype(M) && M.mind && SSticker && SSticker.mode && (M.mind in SSticker.mode.shadowling_thralls) -/proc/is_shadow_or_thrall(var/mob/living/M) +/proc/is_shadow_or_thrall(mob/living/M) return istype(M) && M.mind && SSticker && SSticker.mode && ((M.mind in SSticker.mode.shadowling_thralls) || (M.mind in SSticker.mode.shadows)) -/proc/is_shadow(var/mob/living/M) +/proc/is_shadow(mob/living/M) return istype(M) && M.mind && SSticker && SSticker.mode && (M.mind in SSticker.mode.shadows) @@ -122,7 +122,7 @@ Made by Xhuis //give_shadowling_abilities(shadow) ..() -/datum/game_mode/proc/greet_shadow(var/datum/mind/shadow) +/datum/game_mode/proc/greet_shadow(datum/mind/shadow) to_chat(shadow.current, "Currently, you are disguised as an employee aboard [world.name].") to_chat(shadow.current, "In your limited state, you have two abilities: Hatch and Shadowling Hivemind (:8).") to_chat(shadow.current, "Any other shadowlings are your allies. You must assist them as they shall assist you.") @@ -130,7 +130,7 @@ Made by Xhuis -/datum/game_mode/proc/process_shadow_objectives(var/datum/mind/shadow_mind) +/datum/game_mode/proc/process_shadow_objectives(datum/mind/shadow_mind) var/objective = "enthrall" //may be devour later, but for now it seems murderbone-y if(objective == "enthrall") @@ -140,7 +140,7 @@ Made by Xhuis to_chat(shadow_mind.current, "Objective #1: [objective_explanation]
") -/datum/game_mode/proc/finalize_shadowling(var/datum/mind/shadow_mind) +/datum/game_mode/proc/finalize_shadowling(datum/mind/shadow_mind) var/mob/living/carbon/human/S = shadow_mind.current shadow_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_hatch(null)) spawn(0) @@ -176,7 +176,7 @@ Made by Xhuis GLOB.command_announcement.Announce("Large concentration of psychic bluespace energy detected by long-ranged scanners. Shadowling ascension event imminent. Prevent it at all costs!", "Central Command Higher Dimensional Affairs", 'sound/AI/spanomalies.ogg') return 1 -/datum/game_mode/proc/remove_thrall(datum/mind/thrall_mind, var/kill = 0) +/datum/game_mode/proc/remove_thrall(datum/mind/thrall_mind, kill = 0) if(!istype(thrall_mind) || !(thrall_mind in shadowling_thralls) || !isliving(thrall_mind.current)) return 0 //If there is no mind, the mind isn't a thrall, or the mind's mob isn't alive, return shadowling_thralls.Remove(thrall_mind) diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm index 2956f146945..4d93a601e9d 100644 --- a/code/game/gamemodes/shadowling/shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm @@ -1,6 +1,6 @@ #define EMPOWERED_THRALL_LIMIT 5 -/obj/effect/proc_holder/spell/proc/shadowling_check(var/mob/living/carbon/human/H) +/obj/effect/proc_holder/spell/proc/shadowling_check(mob/living/carbon/human/H) if(!H || !istype(H)) return if(H.incorporeal_move == 1) diff --git a/code/game/gamemodes/steal_items.dm b/code/game/gamemodes/steal_items.dm index 7e15147e885..780962045be 100644 --- a/code/game/gamemodes/steal_items.dm +++ b/code/game/gamemodes/steal_items.dm @@ -13,7 +13,7 @@ var/flags = 0 var/location_override -/datum/theft_objective/proc/check_completion(var/datum/mind/owner) +/datum/theft_objective/proc/check_completion(datum/mind/owner) if(!owner.current) return 0 if(!isliving(owner.current)) @@ -62,7 +62,7 @@ typepath = /obj/item/aicard location_override = "AI Satellite. An intellicard for transportation can be found in Tech Storage, Science Department or manufactured" -/datum/theft_objective/ai/check_special_completion(var/obj/item/aicard/C) +/datum/theft_objective/ai/check_special_completion(obj/item/aicard/C) if(..()) for(var/mob/living/silicon/ai/A in C) if(istype(A, /mob/living/silicon/ai) && A.stat != 2) //See if any AI's are alive inside that card. @@ -154,7 +154,7 @@ required_amount=rand(lower,upper)*step name = "[required_amount] [name]" -/datum/theft_objective/number/check_completion(var/datum/mind/owner) +/datum/theft_objective/number/check_completion(datum/mind/owner) if(!owner.current) return 0 if(!isliving(owner.current)) @@ -166,7 +166,7 @@ found_amount += getAmountStolen(I) return found_amount >= required_amount -/datum/theft_objective/number/proc/getAmountStolen(var/obj/item/I) +/datum/theft_objective/number/proc/getAmountStolen(obj/item/I) return I:amount /datum/theft_objective/unique diff --git a/code/game/gamemodes/vampire/vampire.dm b/code/game/gamemodes/vampire/vampire.dm index 56f31a173be..7d2f0e404f5 100644 --- a/code/game/gamemodes/vampire/vampire.dm +++ b/code/game/gamemodes/vampire/vampire.dm @@ -135,7 +135,7 @@ to_chat(world, text) return 1 -/datum/game_mode/proc/forge_vampire_objectives(var/datum/mind/vampire) +/datum/game_mode/proc/forge_vampire_objectives(datum/mind/vampire) //Objectives are traitor objectives plus blood objectives var/datum/objective/blood/blood_objective = new @@ -172,7 +172,7 @@ return vampire_mob.make_vampire() -/datum/game_mode/proc/greet_vampire(var/datum/mind/vampire, var/you_are=1) +/datum/game_mode/proc/greet_vampire(datum/mind/vampire, you_are=1) var/dat if(you_are) SEND_SOUND(vampire.current, sound('sound/ambience/antag/vampalert.ogg')) @@ -248,7 +248,7 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha qdel(ability) owner.update_sight() // Life updates conditionally, so we need to update sight here in case the vamp loses his vision based powers. Maybe one day refactor to be more OOP and on the vampire's ability datum. -/datum/vampire/proc/update_owner(var/mob/living/carbon/human/current) //Called when a vampire gets cloned. This updates vampire.owner to the new body. +/datum/vampire/proc/update_owner(mob/living/carbon/human/current) //Called when a vampire gets cloned. This updates vampire.owner to the new body. if(current.mind && current.mind.vampire && current.mind.vampire.owner && (current.mind.vampire.owner != current)) current.mind.vampire.owner = current diff --git a/code/game/gamemodes/vampire/vampire_powers.dm b/code/game/gamemodes/vampire/vampire_powers.dm index db245cd0d25..4e06cb02df1 100644 --- a/code/game/gamemodes/vampire/vampire_powers.dm +++ b/code/game/gamemodes/vampire/vampire_powers.dm @@ -564,7 +564,7 @@ H.raise_vampire(user) -/mob/living/carbon/human/proc/raise_vampire(var/mob/M) +/mob/living/carbon/human/proc/raise_vampire(mob/M) if(!istype(M)) log_debug("human/proc/raise_vampire called with invalid argument.") return diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index ee9fd069a76..af83abba66b 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -147,7 +147,7 @@ var/spawn_path = /mob/living/simple_animal/cow //defaulty cows to prevent unintentional narsies var/spawn_amt_left = 20 -/obj/effect/rend/New(loc, var/spawn_type, var/spawn_amt, var/desc) +/obj/effect/rend/New(loc, spawn_type, spawn_amt, desc) ..() src.spawn_path = spawn_type src.spawn_amt_left = spawn_amt @@ -352,7 +352,7 @@ GLOBAL_LIST_EMPTY(multiverse) to_chat(user, "[src] is recharging! Keep in mind it shares a cooldown with the swords wielded by your copies.") -/obj/item/multisword/proc/spawn_copy(var/client/C, var/turf/T, mob/user) +/obj/item/multisword/proc/spawn_copy(client/C, turf/T, mob/user) var/mob/living/carbon/human/M = new/mob/living/carbon/human(T) if(duplicate_self) user.client.prefs.copy_to(M) @@ -398,7 +398,7 @@ GLOBAL_LIST_EMPTY(multiverse) M.mind.special_role = SPECIAL_ROLE_MULTIVERSE log_game("[M.key] was made a multiverse traveller with the objective to help [usr.real_name] protect the station.") -/obj/item/multisword/proc/equip_copy(var/mob/living/carbon/human/M) +/obj/item/multisword/proc/equip_copy(mob/living/carbon/human/M) var/obj/item/multisword/sword = new sword_type sword.assigned = assigned diff --git a/code/game/gamemodes/wizard/godhand.dm b/code/game/gamemodes/wizard/godhand.dm index f2d0e6eb81a..409a1801e40 100644 --- a/code/game/gamemodes/wizard/godhand.dm +++ b/code/game/gamemodes/wizard/godhand.dm @@ -13,7 +13,7 @@ throw_range = 0 throw_speed = 0 -/obj/item/melee/touch_attack/New(var/spell) +/obj/item/melee/touch_attack/New(spell) attached_spell = spell ..() diff --git a/code/game/gamemodes/wizard/raginmages.dm b/code/game/gamemodes/wizard/raginmages.dm index 0c2475edd41..d50a6200764 100644 --- a/code/game/gamemodes/wizard/raginmages.dm +++ b/code/game/gamemodes/wizard/raginmages.dm @@ -16,7 +16,7 @@ to_chat(world, "The current game mode is - Ragin' Mages!") to_chat(world, "The Space Wizard Federation is pissed, crew must help defeat all the Space Wizards invading the station!") -/datum/game_mode/wizard/raginmages/greet_wizard(var/datum/mind/wizard, var/you_are=1) +/datum/game_mode/wizard/raginmages/greet_wizard(datum/mind/wizard, you_are=1) if(you_are) to_chat(wizard.current, "You are the Space Wizard!") to_chat(wizard.current, "The Space Wizard Federation has given you the following tasks:") @@ -85,7 +85,7 @@ return ..() // To silence all struggles within the wizard's lair -/datum/game_mode/wizard/raginmages/proc/end_squabble(var/area/wizard_station/A) +/datum/game_mode/wizard/raginmages/proc/end_squabble(area/wizard_station/A) if(!istype(A)) return // You could probably do mean things with this otherwise var/list/marked_for_death = list() for(var/mob/living/L in A) // To hit non-wizard griefers @@ -143,7 +143,7 @@ // ripped from -tg-'s wizcode, because whee lets make a very general proc for a very specific gamemode // This probably wouldn't do half bad as a proc in __HELPERS // Lemme know if this causes species to mess up spectacularly or anything -/datum/game_mode/wizard/raginmages/proc/makeBody(var/mob/dead/observer/G) +/datum/game_mode/wizard/raginmages/proc/makeBody(mob/dead/observer/G) if(!G || !G.key) return // Let's not steal someone's soul here var/mob/living/carbon/human/new_character = new(pick(GLOB.latejoin)) diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index c21640d8466..43e768a1ef2 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -77,7 +77,7 @@ wizhud.leave_hud(wiz_mind.current) set_antag_hud(wiz_mind.current, null) -/datum/game_mode/proc/forge_wizard_objectives(var/datum/mind/wizard) +/datum/game_mode/proc/forge_wizard_objectives(datum/mind/wizard) var/datum/objective/wizchaos/wiz_objective = new wiz_objective.owner = wizard wizard.objectives += wiz_objective @@ -98,7 +98,7 @@ if(wizard_mob.mind) wizard_mob.mind.name = newname -/datum/game_mode/proc/greet_wizard(var/datum/mind/wizard, var/you_are=1) +/datum/game_mode/proc/greet_wizard(datum/mind/wizard, you_are=1) addtimer(CALLBACK(wizard.current, /mob/.proc/playsound_local, null, 'sound/ambience/antag/ragesmages.ogg', 100, 0), 30) if(you_are) to_chat(wizard.current, "You are the Space Wizard!") @@ -198,7 +198,7 @@ finished = 1 return 1 -/datum/game_mode/wizard/declare_completion(var/ragin = 0) +/datum/game_mode/wizard/declare_completion(ragin = 0) if(finished && !ragin) SSticker.mode_result = "wizard loss - wizard killed" to_chat(world, " The wizard[(wizards.len>1)?"s":""] has been killed by the crew! The Space Wizards Federation has been taught a lesson they will not soon forget!") diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index ac533f0b7ef..6eaaf03aaef 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -54,7 +54,7 @@ L = list() return check_access_list(L) -/obj/proc/check_access_list(var/list/L) +/obj/proc/check_access_list(list/L) generate_req_lists() if(!L) @@ -63,7 +63,7 @@ return 0 return has_access(req_access, req_one_access, L) -/proc/has_access(var/list/req_access, var/list/req_one_access, var/list/accesses) +/proc/has_access(list/req_access, list/req_one_access, list/accesses) for(var/req in req_access) if(!(req in accesses)) //doesn't have this access return 0 @@ -443,7 +443,7 @@ return "Unknown" -/proc/GetIdCard(var/mob/living/carbon/human/H) +/proc/GetIdCard(mob/living/carbon/human/H) if(H.wear_id) var/id = H.wear_id.GetID() if(id) @@ -452,7 +452,7 @@ var/obj/item/I = H.get_active_hand() return I.GetID() -/proc/FindNameFromID(var/mob/living/carbon/human/H) +/proc/FindNameFromID(mob/living/carbon/human/H) ASSERT(istype(H)) var/obj/item/card/id/C = H.get_active_hand() if( istype(C) || istype(C, /obj/item/pda) ) diff --git a/code/game/jobs/job_exp.dm b/code/game/jobs/job_exp.dm index 0e281606124..b30fbac02c4 100644 --- a/code/game/jobs/job_exp.dm +++ b/code/game/jobs/job_exp.dm @@ -85,7 +85,7 @@ GLOBAL_LIST_INIT(role_playtime_requirements, list( src << browse(msg, "window=Player_playtime_check") -/datum/admins/proc/cmd_mentor_show_exp_panel(var/client/C) +/datum/admins/proc/cmd_mentor_show_exp_panel(client/C) if(!C) to_chat(usr, "ERROR: Client not found.") return @@ -197,10 +197,10 @@ GLOBAL_LIST_INIT(role_playtime_requirements, list( return_text += "" return return_text -/client/proc/get_exp_type(var/etype) +/client/proc/get_exp_type(etype) return get_exp_format(get_exp_type_num(etype)) -/client/proc/get_exp_type_num(var/etype) +/client/proc/get_exp_type_num(etype) var/list/play_records = params2list(prefs.exp) return text2num(play_records[etype]) @@ -216,7 +216,7 @@ GLOBAL_LIST_INIT(role_playtime_requirements, list( return result_text.Join("") -/proc/get_exp_format(var/expnum) +/proc/get_exp_format(expnum) if(expnum > 60) return num2text(round(expnum / 60)) + "h" else if(expnum > 0) diff --git a/code/game/jobs/job_objective.dm b/code/game/jobs/job_objective.dm index 660d1830f0a..8eaf9e09b39 100644 --- a/code/game/jobs/job_objective.dm +++ b/code/game/jobs/job_objective.dm @@ -1,7 +1,7 @@ /datum/mind/var/list/job_objectives = list() #define FINDJOBTASK_DEFAULT_NEW 1 // Make a new task of this type if one can't be found. -/datum/mind/proc/findJobTask(var/typepath, var/options = 0) +/datum/mind/proc/findJobTask(typepath, options = 0) var/datum/job_objective/task = locate(typepath) in job_objectives if(!istype(task,typepath)) if(options & FINDJOBTASK_DEFAULT_NEW) @@ -18,7 +18,7 @@ var/units_requested = INFINITY var/completion_payment = 0 // Credits paid to owner when completed -/datum/job_objective/New(var/datum/mind/new_owner) +/datum/job_objective/New(datum/mind/new_owner) owner = new_owner owner.job_objectives += src @@ -27,7 +27,7 @@ var/desc = "Placeholder Objective" return desc -/datum/job_objective/proc/unit_completed(var/count=1) +/datum/job_objective/proc/unit_completed(count=1) units_completed += count /datum/job_objective/proc/is_completed() diff --git a/code/game/jobs/jobs.dm b/code/game/jobs/jobs.dm index 2f8e426e030..e0e817f76ef 100644 --- a/code/game/jobs/jobs.dm +++ b/code/game/jobs/jobs.dm @@ -105,7 +105,7 @@ GLOBAL_LIST_INIT(whitelisted_positions, list( )) -/proc/guest_jobbans(var/job) +/proc/guest_jobbans(job) return (job in GLOB.whitelisted_positions) /proc/get_job_datums() @@ -119,7 +119,7 @@ GLOBAL_LIST_INIT(whitelisted_positions, list( return occupations -/proc/get_alternate_titles(var/job) +/proc/get_alternate_titles(job) var/list/jobs = get_job_datums() var/list/titles = list() diff --git a/code/game/jobs/whitelist.dm b/code/game/jobs/whitelist.dm index fe835c4dc8d..af80e7474a4 100644 --- a/code/game/jobs/whitelist.dm +++ b/code/game/jobs/whitelist.dm @@ -13,13 +13,13 @@ GLOBAL_LIST_EMPTY(whitelist) if(!GLOB.whitelist.len) GLOB.whitelist = null /* -/proc/check_whitelist(mob/M, var/rank) +/proc/check_whitelist(mob/M, rank) if(!whitelist) return 0 return ("[M.ckey]" in whitelist) */ -/proc/is_job_whitelisted(mob/M, var/rank) +/proc/is_job_whitelisted(mob/M, rank) if(guest_jobbans(rank)) if(!config.usewhitelist) return TRUE @@ -68,7 +68,7 @@ GLOBAL_LIST_EMPTY(alien_whitelist) GLOB.alien_whitelist = splittext(text, "\n") //todo: admin aliens -/proc/is_alien_whitelisted(mob/M, var/species) +/proc/is_alien_whitelisted(mob/M, species) if(!config.usealienwhitelist) return TRUE if(config.disable_karma) diff --git a/code/game/machinery/Beacon.dm b/code/game/machinery/Beacon.dm index 1f626f0656b..41612fb870b 100644 --- a/code/game/machinery/Beacon.dm +++ b/code/game/machinery/Beacon.dm @@ -39,7 +39,7 @@ destroy_beacon() return ..() -/obj/machinery/bluespace_beacon/hide(var/intact) +/obj/machinery/bluespace_beacon/hide(intact) invisibility = intact ? INVISIBILITY_MAXIMUM : 0 update_icon() diff --git a/code/game/machinery/ai_slipper.dm b/code/game/machinery/ai_slipper.dm index eaa1120ab04..45cd917c39b 100644 --- a/code/game/machinery/ai_slipper.dm +++ b/code/game/machinery/ai_slipper.dm @@ -27,7 +27,7 @@ disabled = TRUE update_icon() -/obj/machinery/ai_slipper/proc/setState(var/enabled, var/uses) +/obj/machinery/ai_slipper/proc/setState(enabled, uses) disabled = disabled uses = uses power_change() diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index 9d7b73b2bcc..32b9b381887 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -24,7 +24,7 @@ /obj/machinery/button/indestructible resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF -/obj/machinery/driver_button/New(turf/loc, var/w_dir=null) +/obj/machinery/driver_button/New(turf/loc, w_dir=null) ..() switch(w_dir) if(NORTH) @@ -81,7 +81,7 @@ return ..() -/obj/machinery/driver_button/multitool_menu(var/mob/user, var/obj/item/multitool/P) +/obj/machinery/driver_button/multitool_menu(mob/user, obj/item/multitool/P) return {"