From d17080167cec19a8edb1ffd7025c9a4290b9a9aa Mon Sep 17 00:00:00 2001 From: spookydonut Date: Tue, 21 Jul 2020 13:02:04 +0800 Subject: [PATCH] Fix leading slashes and turn on linting for it --- SpacemanDMM.toml | 4 ++++ code/__HELPERS/unsorted.dm | 2 +- code/game/machinery/hologram.dm | 2 +- code/game/mecha/combat/durand.dm | 2 +- code/game/objects/items/grenades/festive.dm | 4 ++-- code/modules/antagonists/_common/antag_datum.dm | 2 +- code/modules/atmospherics/gasmixtures/reactions.dm | 4 ++-- code/modules/mining/aux_base_camera.dm | 10 +++++----- code/modules/mob/living/simple_animal/hostile/bear.dm | 2 +- .../mob/living/simple_animal/hostile/hostile.dm | 2 +- .../simple_animal/hostile/mining_mobs/basilisk.dm | 2 +- .../mob/living/simple_animal/hostile/space_dragon.dm | 2 +- .../living/simple_animal/hostile/venus_human_trap.dm | 2 +- code/modules/projectiles/guns/ballistic/rifle.dm | 8 ++++---- code/modules/reagents/reagent_containers/chem_pack.dm | 2 +- .../xenobiology/crossbreeding/_status_effects.dm | 4 ++-- code/modules/shuttle/spaceship_navigation_beacon.dm | 2 +- 17 files changed, 30 insertions(+), 26 deletions(-) diff --git a/SpacemanDMM.toml b/SpacemanDMM.toml index b8274722546..9b658dce0fa 100644 --- a/SpacemanDMM.toml +++ b/SpacemanDMM.toml @@ -1,2 +1,6 @@ [langserver] dreamchecker = true + +[code_standards] +disallow_relative_type_definitions = true +disallow_relative_proc_definitions = true diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index c4316628538..afc014dcd8f 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1094,7 +1094,7 @@ B --><-- A return closest_atom -proc/pick_closest_path(value, list/matches = get_fancy_list_of_atom_types()) +/proc/pick_closest_path(value, list/matches = get_fancy_list_of_atom_types()) if (value == FALSE) //nothing should be calling us with a number, so this is safe value = input("Enter type to find (blank for all, cancel to cancel)", "Search for type") as null|text if (isnull(value)) diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index 1f3edcfa4c7..503ec318679 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -84,7 +84,7 @@ Possible to do for anyone motivated enough: desc = "It's a floor-mounted device for projecting holographic images. This one will refuse to auto-connect incoming calls." secure = TRUE -obj/machinery/holopad/secure/Initialize() +/obj/machinery/holopad/secure/Initialize() . = ..() var/obj/item/circuitboard/machine/holopad/board = circuit board.secure = TRUE diff --git a/code/game/mecha/combat/durand.dm b/code/game/mecha/combat/durand.dm index efafa478429..f3622726bc3 100644 --- a/code/game/mecha/combat/durand.dm +++ b/code/game/mecha/combat/durand.dm @@ -91,7 +91,7 @@ Expects a turf. Returns true if the attack should be blocked, false if not.*/ . = TRUE return -obj/mecha/combat/durand/attack_generic(mob/user, damage_amount = 0, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, armor_penetration = 0) +/obj/mecha/combat/durand/attack_generic(mob/user, damage_amount = 0, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, armor_penetration = 0) if(defense_check(user.loc)) log_message("Attack absorbed by defense field. Attacker - [user].", LOG_MECHA, color="orange") shield.attack_generic(user, damage_amount, damage_type, damage_flag, sound_effect, armor_penetration) diff --git a/code/game/objects/items/grenades/festive.dm b/code/game/objects/items/grenades/festive.dm index 861b61b26f6..dba90466a14 100644 --- a/code/game/objects/items/grenades/festive.dm +++ b/code/game/objects/items/grenades/festive.dm @@ -84,7 +84,7 @@ /obj/item/grenade/firecracker/fire_act(exposed_temperature, exposed_volume) prime() -obj/item/grenade/firecracker/wirecutter_act(mob/living/user, obj/item/I) +/obj/item/grenade/firecracker/wirecutter_act(mob/living/user, obj/item/I) if(active) return if(det_time) @@ -96,7 +96,7 @@ obj/item/grenade/firecracker/wirecutter_act(mob/living/user, obj/item/I) else to_chat(user, "You've already removed all of the fuse!") -obj/item/grenade/firecracker/preprime(mob/user, delayoverride, msg = TRUE, volume = 80) +/obj/item/grenade/firecracker/preprime(mob/user, delayoverride, msg = TRUE, volume = 80) var/turf/T = get_turf(src) log_grenade(user, T) if(user) diff --git a/code/modules/antagonists/_common/antag_datum.dm b/code/modules/antagonists/_common/antag_datum.dm index 7bac12db69f..f8c054b9941 100644 --- a/code/modules/antagonists/_common/antag_datum.dm +++ b/code/modules/antagonists/_common/antag_datum.dm @@ -266,7 +266,7 @@ GLOBAL_LIST_EMPTY(antagonists) show_name_in_check_antagonists = TRUE //They're all different var/datum/team/custom_team -datum/antagonist/custom/create_team(datum/team/team) +/datum/antagonist/custom/create_team(datum/team/team) custom_team = team /datum/antagonist/custom/get_team() diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm index cc3b6510841..e6774f35cfc 100644 --- a/code/modules/atmospherics/gasmixtures/reactions.dm +++ b/code/modules/atmospherics/gasmixtures/reactions.dm @@ -265,13 +265,13 @@ datum/gas_reaction/freonfire name = "Freon combustion" id = "freonfire" -datum/gas_reaction/freonfire/init_reqs() +/datum/gas_reaction/freonfire/init_reqs() min_requirements = list( /datum/gas/oxygen = MINIMUM_MOLE_COUNT, /datum/gas/freon = MINIMUM_MOLE_COUNT ) -datum/gas_reaction/freonfire/react(datum/gas_mixture/air, datum/holder) +/datum/gas_reaction/freonfire/react(datum/gas_mixture/air, datum/holder) var/energy_released = 0 var/old_heat_capacity = air.heat_capacity() var/list/cached_gases = air.gases //this speeds things up because accessing datum vars is slow diff --git a/code/modules/mining/aux_base_camera.dm b/code/modules/mining/aux_base_camera.dm index 12d7ae32b29..21d45652a79 100644 --- a/code/modules/mining/aux_base_camera.dm +++ b/code/modules/mining/aux_base_camera.dm @@ -202,7 +202,7 @@ name = "Select Airlock Type" button_icon_state = "airlock_select" -datum/action/innate/aux_base/airlock_type/Activate() +/datum/action/innate/aux_base/airlock_type/Activate() if(..()) return @@ -213,7 +213,7 @@ datum/action/innate/aux_base/window_type name = "Select Window Type" button_icon_state = "window_select" -datum/action/innate/aux_base/window_type/Activate() +/datum/action/innate/aux_base/window_type/Activate() if(..()) return B.RCD.toggle_window_type() @@ -222,7 +222,7 @@ datum/action/innate/aux_base/place_fan name = "Place Tiny Fan" button_icon_state = "build_fan" -datum/action/innate/aux_base/place_fan/Activate() +/datum/action/innate/aux_base/place_fan/Activate() if(..()) return @@ -244,11 +244,11 @@ datum/action/innate/aux_base/place_fan/Activate() to_chat(owner, "Tiny fan placed. [B.fans_remaining] remaining.") playsound(fan_turf, 'sound/machines/click.ogg', 50, TRUE) -datum/action/innate/aux_base/install_turret +/datum/action/innate/aux_base/install_turret name = "Install Plasma Anti-Wildlife Turret" button_icon_state = "build_turret" -datum/action/innate/aux_base/install_turret/Activate() +/datum/action/innate/aux_base/install_turret/Activate() if(..()) return diff --git a/code/modules/mob/living/simple_animal/hostile/bear.dm b/code/modules/mob/living/simple_animal/hostile/bear.dm index 7f3056ec998..7260db5b885 100644 --- a/code/modules/mob/living/simple_animal/hostile/bear.dm +++ b/code/modules/mob/living/simple_animal/hostile/bear.dm @@ -173,7 +173,7 @@ mob/living/simple_animal/hostile/bear/butter //The mighty companion to Cak. Seve to_chat(src, "Your name is now \"new_name\"!") name = new_name -mob/living/simple_animal/hostile/bear/butter/AttackingTarget() //Makes some attacks by the butter bear slip those who dare cross its path. +/mob/living/simple_animal/hostile/bear/butter/AttackingTarget() //Makes some attacks by the butter bear slip those who dare cross its path. if(isliving(target)) var/mob/living/L = target if((L.mobility_flags & MOBILITY_STAND)) diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 78fed859431..fa33a58b4a5 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -466,7 +466,7 @@ DestroyObjectsInDirection(direction) -mob/living/simple_animal/hostile/proc/DestroySurroundings() // for use with megafauna destroying everything around them +/mob/living/simple_animal/hostile/proc/DestroySurroundings() // for use with megafauna destroying everything around them if(environment_smash) EscapeConfinement() for(var/dir in GLOB.cardinals) diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm index ef5784a93a0..fd4b832575d 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/basilisk.dm @@ -81,7 +81,7 @@ projectiletype = /obj/projectile/temp/basilisk/heated addtimer(CALLBACK(src, .proc/cool_down), 3000) -mob/living/simple_animal/hostile/asteroid/basilisk/proc/cool_down() +/mob/living/simple_animal/hostile/asteroid/basilisk/proc/cool_down() visible_message("[src] appears to be cooling down...") if(stat != DEAD) icon_state = "Basilisk" diff --git a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm index b0793ee453e..dec465d9516 100644 --- a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm +++ b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm @@ -209,7 +209,7 @@ * Arguments: * * turf/T - The turf to trigger the effects on. */ -mob/living/simple_animal/hostile/space_dragon/proc/dragon_fire_line(turf/T) +/mob/living/simple_animal/hostile/space_dragon/proc/dragon_fire_line(turf/T) var/list/hit_list = list() hit_list += src new /obj/effect/hotspot(T) diff --git a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm index c07032fe4e3..51d807e713a 100644 --- a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm +++ b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm @@ -188,5 +188,5 @@ * Arguments: * * datum/beam/vine - The vine to be removed from the list. */ -mob/living/simple_animal/hostile/venus_human_trap/proc/remove_vine(datum/beam/vine, force) +/mob/living/simple_animal/hostile/venus_human_trap/proc/remove_vine(datum/beam/vine, force) vines -= vine diff --git a/code/modules/projectiles/guns/ballistic/rifle.dm b/code/modules/projectiles/guns/ballistic/rifle.dm index 980a2722e43..1da8baa8024 100644 --- a/code/modules/projectiles/guns/ballistic/rifle.dm +++ b/code/modules/projectiles/guns/ballistic/rifle.dm @@ -16,11 +16,11 @@ bolt_drop_sound = 'sound/weapons/gun/rifle/bolt_in.ogg' tac_reloads = FALSE -obj/item/gun/ballistic/rifle/update_overlays() +/obj/item/gun/ballistic/rifle/update_overlays() . = ..() . += "[icon_state]_bolt[bolt_locked ? "_locked" : ""]" -obj/item/gun/ballistic/rifle/rack(mob/user = null) +/obj/item/gun/ballistic/rifle/rack(mob/user = null) if (bolt_locked == FALSE) to_chat(user, "You open the bolt of \the [src].") playsound(src, rack_sound, rack_sound_volume, rack_sound_vary) @@ -30,12 +30,12 @@ obj/item/gun/ballistic/rifle/rack(mob/user = null) return drop_bolt(user) -obj/item/gun/ballistic/rifle/can_shoot() +/obj/item/gun/ballistic/rifle/can_shoot() if (bolt_locked) return FALSE return ..() -obj/item/gun/ballistic/rifle/attackby(obj/item/A, mob/user, params) +/obj/item/gun/ballistic/rifle/attackby(obj/item/A, mob/user, params) if (!bolt_locked) to_chat(user, "The bolt is closed!") return diff --git a/code/modules/reagents/reagent_containers/chem_pack.dm b/code/modules/reagents/reagent_containers/chem_pack.dm index 4bb64506100..666f812e705 100644 --- a/code/modules/reagents/reagent_containers/chem_pack.dm +++ b/code/modules/reagents/reagent_containers/chem_pack.dm @@ -33,7 +33,7 @@ . += "Alt-click to seal it." -obj/item/reagent_containers/chem_pack/attack_self(mob/user) +/obj/item/reagent_containers/chem_pack/attack_self(mob/user) if(sealed) return ..() diff --git a/code/modules/research/xenobiology/crossbreeding/_status_effects.dm b/code/modules/research/xenobiology/crossbreeding/_status_effects.dm index ac3a051031b..4439a19b448 100644 --- a/code/modules/research/xenobiology/crossbreeding/_status_effects.dm +++ b/code/modules/research/xenobiology/crossbreeding/_status_effects.dm @@ -223,7 +223,7 @@ duration = -1 alert_type = null -datum/status_effect/rebreathing/tick() +/datum/status_effect/rebreathing/tick() owner.adjustOxyLoss(-6, 0) //Just a bit more than normal breathing. /////////////////////////////////////////////////////// @@ -505,7 +505,7 @@ datum/status_effect/rebreathing/tick() ADD_TRAIT(owner, TRAIT_NOSLIPWATER, "slimestatus") return ..() -datum/status_effect/stabilized/blue/on_remove() +/datum/status_effect/stabilized/blue/on_remove() REMOVE_TRAIT(owner, TRAIT_NOSLIPWATER, "slimestatus") /datum/status_effect/stabilized/metal diff --git a/code/modules/shuttle/spaceship_navigation_beacon.dm b/code/modules/shuttle/spaceship_navigation_beacon.dm index ec6efb1e6b4..e5b4cf4ea79 100644 --- a/code/modules/shuttle/spaceship_navigation_beacon.dm +++ b/code/modules/shuttle/spaceship_navigation_beacon.dm @@ -21,7 +21,7 @@ . = ..() SSshuttle.beacons |= src -obj/machinery/spaceship_navigation_beacon/emp_act() +/obj/machinery/spaceship_navigation_beacon/emp_act() locked = TRUE /obj/machinery/spaceship_navigation_beacon/Destroy()