diff --git a/code/__HELPERS/path.dm b/code/__HELPERS/path.dm index 72ed8da819..8e6cd2e759 100644 --- a/code/__HELPERS/path.dm +++ b/code/__HELPERS/path.dm @@ -18,17 +18,17 @@ * * exclude: If we want to avoid a specific turf, like if we're a mulebot who already got blocked by some turf * * skip_first: Whether or not to delete the first item in the path. This would be done because the first item is the starting tile, which can break movement for some creatures. */ -/proc/get_path_to(caller, end, max_distance = 30, mintargetdist, id=null, simulated_only = TRUE, turf/exclude, skip_first=TRUE) - if(!caller || !get_turf(end)) +/proc/get_path_to(caller1, end, max_distance = 30, mintargetdist, id=null, simulated_only = TRUE, turf/exclude, skip_first=TRUE) + if(!caller1 || !get_turf(end)) return - var/l = SSpathfinder.mobs.getfree(caller) + var/l = SSpathfinder.mobs.getfree(caller1) while(!l) stoplag(3) - l = SSpathfinder.mobs.getfree(caller) + l = SSpathfinder.mobs.getfree(caller1) var/list/path - var/datum/pathfind/pathfind_datum = new(caller, end, id, max_distance, mintargetdist, simulated_only, exclude) + var/datum/pathfind/pathfind_datum = new(caller1, end, id, max_distance, mintargetdist, simulated_only, exclude) path = pathfind_datum.search() qdel(pathfind_datum) @@ -44,7 +44,7 @@ * Note that this can only be used inside the [datum/pathfind][pathfind datum] since it uses variables from said datum. * If you really want to optimize things, optimize this, cuz this gets called a lot. */ -#define CAN_STEP(cur_turf, next) (next && !next.density && !(simulated_only && SSpathfinder.space_type_cache[next.type]) && !cur_turf.LinkBlockedWithAccess(next,caller, id) && (next != avoid)) +#define CAN_STEP(cur_turf, next) (next && !next.density && !(simulated_only && SSpathfinder.space_type_cache[next.type]) && !cur_turf.LinkBlockedWithAccess(next,caller1, id) && (next != avoid)) /// Another helper macro for JPS, for telling when a node has forced neighbors that need expanding #define STEP_NOT_HERE_BUT_THERE(cur_turf, dirA, dirB) ((!CAN_STEP(cur_turf, get_step(cur_turf, dirA)) && CAN_STEP(cur_turf, get_step(cur_turf, dirB)))) @@ -97,7 +97,7 @@ /// The datum used to handle the JPS pathfinding, completely self-contained /datum/pathfind /// The thing that we're actually trying to path for - var/atom/movable/caller + var/atom/movable/caller1 /// The turf where we started at var/turf/start /// The turf we're trying to path to (note that this won't track a moving target) @@ -121,8 +121,8 @@ /// A specific turf we're avoiding, like if a mulebot is being blocked by someone t-posing in a doorway we're trying to get through var/turf/avoid -/datum/pathfind/New(atom/movable/caller, atom/goal, id, max_distance, mintargetdist, simulated_only, avoid) - src.caller = caller +/datum/pathfind/New(atom/movable/caller1, atom/goal, id, max_distance, mintargetdist, simulated_only, avoid) + src.caller1 = caller1 end = get_turf(goal) open = new /datum/heap(/proc/HeapPathWeightCompare) sources = new() @@ -139,7 +139,7 @@ * return null, which [/proc/get_path_to] translates to an empty list (notable for simple bots, who need empty lists) */ /datum/pathfind/proc/search() - start = get_turf(caller) + start = get_turf(caller1) if(!start || !end) stack_trace("Invalid A* start or destination") return @@ -155,7 +155,7 @@ //then run the main loop while(!open.is_empty() && !path) - if(!caller) + if(!caller1) return current_processed_node = open.pop() //get the lower f_value turf in the open list if(max_distance && (current_processed_node.number_tiles > max_distance))//if too many steps, don't process that path @@ -333,11 +333,11 @@ * For seeing if we can actually move between 2 given turfs while accounting for our access and the caller's pass_flags * * Arguments: - * * caller: The movable, if one exists, being used for mobility checks to see what tiles it can reach + * * caller1: The movable, if one exists, being used for mobility checks to see what tiles it can reach * * ID: An ID card that decides if we can gain access to doors that would otherwise block a turf * * simulated_only: Do we only worry about turfs with simulated atmos, most notably things that aren't space? */ -/turf/proc/LinkBlockedWithAccess(turf/destination_turf, caller, ID) +/turf/proc/LinkBlockedWithAccess(turf/destination_turf, caller1, ID) if(destination_turf.x != x && destination_turf.y != y) //diagonal var/in_dir = get_dir(destination_turf,src) // eg. northwest (1+8) = 9 (00001001) var/first_step_direction_a = in_dir & 3 // eg. north (1+8)&3 (0000 0011) = 1 (0000 0001) @@ -345,7 +345,7 @@ for(var/first_step_direction in list(first_step_direction_a,first_step_direction_b)) var/turf/midstep_turf = get_step(destination_turf,first_step_direction) - var/way_blocked = midstep_turf.density || LinkBlockedWithAccess(midstep_turf,caller,ID) || midstep_turf.LinkBlockedWithAccess(destination_turf,caller,ID) + var/way_blocked = midstep_turf.density || LinkBlockedWithAccess(midstep_turf,caller1,ID) || midstep_turf.LinkBlockedWithAccess(destination_turf,caller1,ID) if(!way_blocked) return FALSE return TRUE @@ -372,7 +372,7 @@ // Destination blockers check var/reverse_dir = get_dir(destination_turf, src) for(var/obj/iter_object in destination_turf) - if(!iter_object.CanAStarPass(ID, reverse_dir, caller)) + if(!iter_object.CanAStarPass(ID, reverse_dir, caller1)) return TRUE return FALSE diff --git a/code/controllers/hooks.dm b/code/controllers/hooks.dm index 9eb6631c3b..d7e001b4c6 100644 --- a/code/controllers/hooks.dm +++ b/code/controllers/hooks.dm @@ -28,10 +28,10 @@ if(!hook_path) CRASH("Invalid hook '/hook/[hook]' called.") - var/caller = new hook_path + var/caller1 = new hook_path var/status = 1 for(var/P in typesof("[hook_path]/proc")) - if(!call(caller, P)(arglist(args))) + if(!call(caller1, P)(arglist(args))) CRASH("Hook '[P]' failed or runtimed.") return status diff --git a/code/datums/action.dm b/code/datums/action.dm index a4bd371c1e..295b6c4461 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -895,13 +895,13 @@ return PreActivate(owner) /// Intercepts client owner clicks to activate the ability -/datum/action/cooldown/proc/InterceptClickOn(mob/living/caller, params, atom/target) +/datum/action/cooldown/proc/InterceptClickOn(mob/living/, params, atom/target) if(!IsAvailable()) return FALSE if(!target) return FALSE PreActivate(target) - caller.click_intercept = null + .click_intercept = null return TRUE /// For signal calling diff --git a/code/datums/elements/_element.dm b/code/datums/elements/_element.dm index a77a519909..62e719c325 100644 --- a/code/datums/elements/_element.dm +++ b/code/datums/elements/_element.dm @@ -27,10 +27,10 @@ /// Deactivates the functionality defines by the element on the given datum /datum/element/proc/Detach(datum/source, force) + SHOULD_CALL_PARENT(TRUE) SIGNAL_HANDLER SEND_SIGNAL(source, COMSIG_ELEMENT_DETACH, src) - SHOULD_CALL_PARENT(TRUE) UnregisterSignal(source, COMSIG_PARENT_QDELETING) /datum/element/Destroy(force) diff --git a/code/datums/holocall.dm b/code/datums/holocall.dm index bb033c10c9..24b4535d5d 100644 --- a/code/datums/holocall.dm +++ b/code/datums/holocall.dm @@ -35,9 +35,9 @@ var/head_call = FALSE //calls from a head of staff autoconnect, if the receiving pad is not secure. //creates a holocall made by `caller` from `calling_pad` to `callees` -/datum/holocall/New(mob/living/caller, obj/machinery/holopad/calling_pad, list/callees, elevated_access = FALSE) +/datum/holocall/New(mob/living/, obj/machinery/holopad/calling_pad, list/callees, elevated_access = FALSE) call_start_time = world.time - user = caller + user = calling_pad.outgoing_call = src calling_holopad = calling_pad head_call = elevated_access diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index f6979452ed..71be595a3a 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1295,7 +1295,7 @@ assemblytype = initial(airlock.assemblytype) update_icon() -/obj/machinery/door/airlock/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/caller) +/obj/machinery/door/airlock/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/caller1) //Airlock is passable if it is open (!density), bot has access, and is not bolted shut or powered off) return !density || (check_access(ID) && !locked && hasPower()) diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index 73f9089050..95b2293756 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -264,7 +264,7 @@ Possible to do for anyone motivated enough: for(var/I in holo_calls) var/datum/holocall/HC = I var/list/call_data = list( - caller = HC.user, + = HC.user, connected = HC.connected_holopad == src ? TRUE : FALSE, ref = REF(HC) ) diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index 2536c9078f..84dca8f012 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -725,13 +725,13 @@ DEFINE_BITFIELD(turret_flags, list( remote_controller = null return TRUE -/obj/machinery/porta_turret/proc/InterceptClickOn(mob/living/caller, params, atom/A) +/obj/machinery/porta_turret/proc/InterceptClickOn(mob/living/caller1, params, atom/A) if(!manual_control) return FALSE - if(!can_interact(caller)) + if(!can_interact(caller1)) remove_control() return FALSE - log_combat(caller,A,"fired with manual turret control at") + log_combat(caller1,A,"fired with manual turret control at") target(A) return TRUE diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 10b8c04367..ee38e031a3 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -261,11 +261,11 @@ * Arguments: * * ID- An ID card representing what access we have (and thus if we can open things like airlocks or windows to pass through them). The ID card's physical location does not matter, just the reference * * to_dir- What direction we're trying to move in, relevant for things like directional windows that only block movement in certain directions - * * caller- The movable we're checking pass flags for, if we're making any such checks + * * caller1- The movable we're checking pass flags for, if we're making any such checks **/ -/obj/proc/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/caller) - if(ismovable(caller)) - var/atom/movable/AM = caller +/obj/proc/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/caller1) + if(ismovable(caller1)) + var/atom/movable/AM = caller1 if(AM.pass_flags & pass_flags_self) return TRUE . = !density diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 925184b7c7..1642f58f55 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -301,10 +301,10 @@ if((mover.pass_flags & PASSGRILLE) || istype(mover, /obj/item/projectile)) return prob(girderpasschance) -/obj/structure/girder/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/caller) +/obj/structure/girder/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/caller1) . = !density - if(istype(caller)) - . = . || (caller.pass_flags & PASSGRILLE) + if(istype(caller1)) + . = . || (caller1.pass_flags & PASSGRILLE) /obj/structure/girder/deconstruct(disassembled = TRUE) if(!(flags_1 & NODECONSTRUCT_1)) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 64f964a103..42c1a851c0 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -130,10 +130,10 @@ if(!. && istype(mover, /obj/item/projectile)) return prob(30) -/obj/structure/grille/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/caller) +/obj/structure/grille/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/caller1) . = !density - if(istype(caller)) - . = . || (caller.pass_flags & PASSGRILLE) + if(istype(caller1)) + . = . || (caller1.pass_flags & PASSGRILLE) /obj/structure/grille/attackby(obj/item/W, mob/user, params) user.DelayNextAction(CLICK_CD_MELEE) diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 29dc63a077..6a3e775bc1 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -385,7 +385,7 @@ GLOBAL_LIST_EMPTY(crematoriums) else return FALSE -/obj/structure/tray/m_tray/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/caller) +/obj/structure/tray/m_tray/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/caller1) . = !density - if(istype(caller)) - . = . || (caller.pass_flags & PASSTABLE) + if(istype(caller1)) + . = . || (caller1.pass_flags & PASSTABLE) diff --git a/code/game/objects/structures/plasticflaps.dm b/code/game/objects/structures/plasticflaps.dm index a8cdb517ca..5a2a98a99c 100644 --- a/code/game/objects/structures/plasticflaps.dm +++ b/code/game/objects/structures/plasticflaps.dm @@ -56,17 +56,17 @@ return FALSE return TRUE -/obj/structure/plasticflaps/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/caller) - if(isliving(caller)) - if(isbot(caller)) +/obj/structure/plasticflaps/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/caller1) + if(isliving(caller1)) + if(isbot(caller1)) return TRUE - var/mob/living/living_caller = caller - if(!(SEND_SIGNAL(living_caller, COMSIG_CHECK_VENTCRAWL)) && living_caller.mob_size != MOB_SIZE_TINY) + var/mob/living/living_caller1 = caller1 + if(!(SEND_SIGNAL(living_caller1, COMSIG_CHECK_VENTCRAWL)) && living_caller1.mob_size != MOB_SIZE_TINY) return FALSE - if(caller?.pulling) - return CanAStarPass(ID, to_dir, caller.pulling) + if(caller1?.pulling) + return CanAStarPass(ID, to_dir, caller1.pulling) return TRUE //diseases, stings, etc can pass /obj/structure/plasticflaps/CanAllowThrough(atom/movable/A, turf/T) diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 4c7d54ee40..34597ade7c 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -118,10 +118,10 @@ if(locate(/obj/structure/table) in get_turf(mover)) return TRUE -/obj/structure/table/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/caller) +/obj/structure/table/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/caller1) . = !density - if(istype(caller)) - . = . || (caller.pass_flags & PASSTABLE) + if(istype(caller1)) + . = . || (caller1.pass_flags & PASSTABLE) /obj/structure/table/proc/tableplace(mob/living/user, mob/living/pushed_mob) pushed_mob.forceMove(loc) @@ -747,10 +747,10 @@ else return FALSE -/obj/structure/rack/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/caller) +/obj/structure/rack/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/caller1) . = !density - if(istype(caller)) - . = . || (caller.pass_flags & PASSTABLE) + if(istype(caller1)) + . = . || (caller1.pass_flags & PASSTABLE) /obj/structure/rack/MouseDrop_T(obj/O, mob/user) . = ..() diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 59852c47bb..e7e666ee29 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -570,7 +570,7 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup) /obj/structure/window/get_dumping_location(obj/item/storage/source,mob/user) return null -/obj/structure/window/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/caller) +/obj/structure/window/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/) if(!density) return TRUE if((dir == FULLTILE_WINDOW_DIR) || (dir == to_dir)) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 84810d26cd..b9cad9b78c 100755 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -634,7 +634,7 @@ GLOBAL_LIST_EMPTY(station_turfs) * * ID: An ID card that decides if we can gain access to doors that would otherwise block a turf * * simulated_only: Do we only worry about turfs with simulated atmos, most notably things that aren't space? */ -/turf/proc/reachableAdjacentTurfs(caller, ID, simulated_only) +/turf/proc/reachableAdjacentTurfs(, ID, simulated_only) var/static/space_type_cache = typecacheof(/turf/open/space) . = list() @@ -642,6 +642,6 @@ GLOBAL_LIST_EMPTY(station_turfs) var/turf/turf_to_check = get_step(src,iter_dir) if(!turf_to_check || (simulated_only && space_type_cache[turf_to_check.type])) continue - if(turf_to_check.density || LinkBlockedWithAccess(turf_to_check, caller, ID)) + if(turf_to_check.density || LinkBlockedWithAccess(turf_to_check, , ID)) continue . += turf_to_check diff --git a/code/modules/antagonists/blob/blob/theblob.dm b/code/modules/antagonists/blob/blob/theblob.dm index f06c533a5a..ab2470a0e9 100644 --- a/code/modules/antagonists/blob/blob/theblob.dm +++ b/code/modules/antagonists/blob/blob/theblob.dm @@ -71,10 +71,10 @@ /obj/structure/blob/CanAtmosPass(turf/T) return !atmosblock -/obj/structure/blob/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/caller) +/obj/structure/blob/CanAStarPass(obj/item/card/id/ID, to_dir, atom/movable/) . = FALSE - if(istype(caller)) - . = . || (caller.pass_flags & PASSBLOB) + if(istype()) + . = . || (.pass_flags & PASSBLOB) /obj/structure/blob/update_icon() //Updates color based on overmind color if we have an overmind. . = ..() diff --git a/code/modules/antagonists/bloodsucker/bloodsucker_powers.dm b/code/modules/antagonists/bloodsucker/bloodsucker_powers.dm index dc16ecef1e..7726ac5184 100644 --- a/code/modules/antagonists/bloodsucker/bloodsucker_powers.dm +++ b/code/modules/antagonists/bloodsucker/bloodsucker_powers.dm @@ -266,5 +266,5 @@ ..() linked_power.DeactivatePower() -/obj/effect/proc_holder/bloodsucker/InterceptClickOn(mob/living/caller, params, atom/A) +/obj/effect/proc_holder/bloodsucker/InterceptClickOn(mob/living/, params, atom/A) return linked_power.ClickWithPower(A) diff --git a/code/modules/antagonists/clockcult/clock_helpers/slab_abilities.dm b/code/modules/antagonists/clockcult/clock_helpers/slab_abilities.dm index a00019aa45..64de381f9d 100644 --- a/code/modules/antagonists/clockcult/clock_helpers/slab_abilities.dm +++ b/code/modules/antagonists/clockcult/clock_helpers/slab_abilities.dm @@ -14,7 +14,7 @@ finished = TRUE QDEL_IN(src, 6) -/obj/effect/proc_holder/slab/InterceptClickOn(mob/living/caller, params, atom/target) +/obj/effect/proc_holder/slab/InterceptClickOn(mob/living/caller1, params, atom/target) if(..() || in_progress) return TRUE if(ranged_ability_user.incapacitated() || !slab || !(slab in ranged_ability_user.held_items) || target == slab) @@ -24,7 +24,7 @@ //For the Hateful Manacles scripture; applies replicant handcuffs to the target. /obj/effect/proc_holder/slab/hateful_manacles -/obj/effect/proc_holder/slab/hateful_manacles/InterceptClickOn(mob/living/caller, params, atom/target) +/obj/effect/proc_holder/slab/hateful_manacles/InterceptClickOn(mob/living/caller1, params, atom/target) if(..()) return TRUE @@ -79,7 +79,7 @@ /obj/effect/proc_holder/slab/compromise ranged_mousepointer = 'icons/effects/compromise_target.dmi' -/obj/effect/proc_holder/slab/compromise/InterceptClickOn(mob/living/caller, params, atom/target) +/obj/effect/proc_holder/slab/compromise/InterceptClickOn(mob/living/caller1, params, atom/target) if(..()) return TRUE @@ -138,7 +138,7 @@ /obj/effect/proc_holder/slab/volt ranged_mousepointer = 'icons/effects/volt_target.dmi' -/obj/effect/proc_holder/slab/volt/InterceptClickOn(mob/living/caller, params, atom/target) +/obj/effect/proc_holder/slab/volt/InterceptClickOn(mob/living/caller1, params, atom/target) if(target == slab || ..()) //we can't cancel return TRUE @@ -161,7 +161,7 @@ /obj/effect/proc_holder/slab/kindle ranged_mousepointer = 'icons/effects/volt_target.dmi' -/obj/effect/proc_holder/slab/kindle/InterceptClickOn(mob/living/caller, params, atom/target) +/obj/effect/proc_holder/slab/kindle/InterceptClickOn(mob/living/caller1, params, atom/target) if(..()) return TRUE @@ -179,7 +179,7 @@ log_combat(ranged_ability_user, U, "fired at with Kindle") playsound(ranged_ability_user, 'sound/magic/blink.ogg', 50, TRUE, frequency = 0.5) var/obj/item/projectile/kindle/A = new(T) - A.preparePixelProjectile(target, caller, params) + A.preparePixelProjectile(target, caller1, params) A.fire() remove_ranged_ability() @@ -243,7 +243,7 @@ /obj/effect/proc_holder/slab/vanguard ranged_mousepointer = 'icons/effects/vanguard_target.dmi' -/obj/effect/proc_holder/slab/vanguard/InterceptClickOn(mob/living/caller, params, atom/target) +/obj/effect/proc_holder/slab/vanguard/InterceptClickOn(mob/living/caller1, params, atom/target) if(..()) return TRUE @@ -286,7 +286,7 @@ /obj/effect/proc_holder/slab/judicial ranged_mousepointer = 'icons/effects/visor_reticule.dmi' -/obj/effect/proc_holder/slab/judicial/InterceptClickOn(mob/living/caller, params, atom/target) +/obj/effect/proc_holder/slab/judicial/InterceptClickOn(mob/living/caller1, params, atom/target) if(..()) return TRUE diff --git a/code/modules/antagonists/clockcult/clock_items/judicial_visor.dm b/code/modules/antagonists/clockcult/clock_items/judicial_visor.dm index 542361bdf6..edc0e9a10f 100644 --- a/code/modules/antagonists/clockcult/clock_items/judicial_visor.dm +++ b/code/modules/antagonists/clockcult/clock_items/judicial_visor.dm @@ -112,7 +112,7 @@ message = "You harness [visor]'s power. Left-click to place a judicial marker!" add_ranged_ability(user, message) -/obj/effect/proc_holder/judicial_visor/InterceptClickOn(mob/living/caller, params, atom/target) +/obj/effect/proc_holder/judicial_visor/InterceptClickOn(mob/living/, params, atom/target) if(..()) return if(ranged_ability_user.incapacitated() || !visor || visor != ranged_ability_user.get_item_by_slot(ITEM_SLOT_EYES)) diff --git a/code/modules/antagonists/cult/blood_magic.dm b/code/modules/antagonists/cult/blood_magic.dm index d4ff89084c..b58127e0e2 100644 --- a/code/modules/antagonists/cult/blood_magic.dm +++ b/code/modules/antagonists/cult/blood_magic.dm @@ -252,10 +252,10 @@ else add_ranged_ability(user, "You prepare to horrify a target...") -/obj/effect/proc_holder/horror/InterceptClickOn(mob/living/caller, params, atom/target) +/obj/effect/proc_holder/horror/InterceptClickOn(mob/living/, params, atom/target) if(..()) return - if(ranged_ability_user.incapacitated() || !iscultist(caller)) + if(ranged_ability_user.incapacitated() || !iscultist()) remove_ranged_ability() return var/turf/T = get_turf(ranged_ability_user) diff --git a/code/modules/antagonists/cult/cult_comms.dm b/code/modules/antagonists/cult/cult_comms.dm index cd348485f1..f96d556499 100644 --- a/code/modules/antagonists/cult/cult_comms.dm +++ b/code/modules/antagonists/cult/cult_comms.dm @@ -256,7 +256,7 @@ else add_ranged_ability(user, "You prepare to mark a target for your cult...") -/obj/effect/proc_holder/cultmark/InterceptClickOn(mob/living/caller, params, atom/target) +/obj/effect/proc_holder/cultmark/InterceptClickOn(mob/living/, params, atom/target) if(..()) return if(ranged_ability_user.incapacitated()) @@ -266,7 +266,7 @@ if(!isturf(T)) return FALSE - var/datum/antagonist/cult/C = caller.mind.has_antag_datum(/datum/antagonist/cult,TRUE) + var/datum/antagonist/cult/C = .mind.has_antag_datum(/datum/antagonist/cult,TRUE) if(!C.cult_team) to_chat(ranged_ability_user, "What is the point of marking a target for yourself?") remove_ranged_ability() @@ -437,7 +437,7 @@ else add_ranged_ability(user, "You prepare to tear through the fabric of reality...") -/obj/effect/proc_holder/pulse/InterceptClickOn(mob/living/caller, params, atom/target) +/obj/effect/proc_holder/pulse/InterceptClickOn(mob/living/, params, atom/target) if(..()) return if(ranged_ability_user.incapacitated()) @@ -447,7 +447,7 @@ if(!isturf(T)) return FALSE if(target in view(7, get_turf(ranged_ability_user))) - if((!(iscultist(target) || istype(target, /obj/structure/destructible/cult)) || target == caller) && !(attached_action.throwing)) + if((!(iscultist(target) || istype(target, /obj/structure/destructible/cult)) || target == ) && !(attached_action.throwing)) return if(!attached_action.throwing) attached_action.throwing = TRUE @@ -467,5 +467,5 @@ attached_action.throwing = FALSE attached_action.cooldown = world.time + attached_action.base_cooldown remove_ranged_ability("A pulse of blood magic surges through you as you shift [attached_action.throwee] through time and space.") - caller.update_action_buttons_icon() - addtimer(CALLBACK(caller, TYPE_PROC_REF(/mob, update_action_buttons_icon)), attached_action.base_cooldown) + .update_action_buttons_icon() + addtimer(CALLBACK(, TYPE_PROC_REF(/mob, update_action_buttons_icon)), attached_action.base_cooldown) diff --git a/code/modules/antagonists/eldritch_cult/eldritch_effects.dm b/code/modules/antagonists/eldritch_cult/eldritch_effects.dm index 24291b5a2e..6f74fe0367 100644 --- a/code/modules/antagonists/eldritch_cult/eldritch_effects.dm +++ b/code/modules/antagonists/eldritch_cult/eldritch_effects.dm @@ -147,9 +147,9 @@ * * Automatically creates more reality smashes */ -/datum/reality_smash_tracker/proc/Generate(mob/caller) - if(istype(caller)) - targets += caller +/datum/reality_smash_tracker/proc/Generate(mob/) + if(istype()) + targets += var/targ_len = length(targets) var/smash_len = length(smashes) var/number = max(targ_len * (6-(targ_len-1)) - smash_len,1) diff --git a/code/modules/antagonists/traitor/equipment/Malf_Modules.dm b/code/modules/antagonists/traitor/equipment/Malf_Modules.dm index 44e70ebb34..778e3c088a 100644 --- a/code/modules/antagonists/traitor/equipment/Malf_Modules.dm +++ b/code/modules/antagonists/traitor/equipment/Malf_Modules.dm @@ -597,7 +597,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list( enable_text = "You tap into the station's powernet. Click on a machine to detonate it, or use the ability again to cancel." disable_text = "You release your hold on the powernet." -/obj/effect/proc_holder/ranged_ai/overload_machine/InterceptClickOn(mob/living/caller, params, obj/machinery/target) +/obj/effect/proc_holder/ranged_ai/overload_machine/InterceptClickOn(mob/living/, params, obj/machinery/target) if(..()) return if(ranged_ability_user.incapacitated()) @@ -644,7 +644,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list( enable_text = "You tap into the station's powernet. Click on a machine to animate it, or use the ability again to cancel." disable_text = "You release your hold on the powernet." -/obj/effect/proc_holder/ranged_ai/override_machine/InterceptClickOn(mob/living/caller, params, obj/machinery/target) +/obj/effect/proc_holder/ranged_ai/override_machine/InterceptClickOn(mob/living/, params, obj/machinery/target) if(..()) return if(ranged_ability_user.incapacitated()) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 7e505d2861..564c85e12b 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -367,7 +367,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) if(character_settings_tab == LOADOUT_CHAR_TAB) //if loadout //calculate your gear points from the chosen item gear_points = CONFIG_GET(number/initial_gear_points) - var/list/chosen_gear = loadout_data["SAVE_[loadout_slot]"] + var/list/chosen_gear = loadout_data?["SAVE_[loadout_slot]"] if(islist(chosen_gear)) loadout_errors = 0 for(var/loadout_item in chosen_gear) diff --git a/code/modules/holodeck/area_copy.dm b/code/modules/holodeck/area_copy.dm index 167974a193..5af6d0ac37 100644 --- a/code/modules/holodeck/area_copy.dm +++ b/code/modules/holodeck/area_copy.dm @@ -1,7 +1,7 @@ //Vars that will not be copied when using /DuplicateObject GLOBAL_LIST_INIT(duplicate_forbidden_vars,list( "tag", "datum_components", "area", "type", "loc", "locs", "vars", "parent", "parent_type", "verbs", "ckey", "key", - "power_supply", "contents", "reagents", "stat", "x", "y", "z", "group", "atmos_adjacent_turfs", "comp_lookup" + "power_supply", "contents", "reagents", "stat", "x", "y", "z", "group", "atmos_adjacent_turfs", "comp_lookup", "pixloc" )) GLOBAL_LIST_INIT(duplicate_forbidden_vars_by_type, typecacheof_assoc_list(list( diff --git a/code/modules/holodeck/computer.dm b/code/modules/holodeck/computer.dm index a9717ed0ac..6270cd0923 100644 --- a/code/modules/holodeck/computer.dm +++ b/code/modules/holodeck/computer.dm @@ -180,7 +180,7 @@ var/obj/effect/holodeck_effect/HE = e HE.tick() - active_power_usage = 50 + spawned.len * 3 + effects.len * 5 + active_power_usage = 50 + spawned?.len * 3 + effects?.len * 5 /obj/machinery/computer/holodeck/emag_act(mob/user) . = ..() diff --git a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm index bcb6c9b296..69fbdce01e 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm @@ -203,7 +203,7 @@ Doesn't work on other aliens/AI.*/ action.button_icon_state = "alien_neurotoxin_[active]" action.UpdateButtons() -/obj/effect/proc_holder/alien/neurotoxin/InterceptClickOn(mob/living/caller, params, atom/target) +/obj/effect/proc_holder/alien/neurotoxin/InterceptClickOn(mob/living/, params, atom/target) if(..()) return var/p_cost = 50 diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index 913537c241..71af8c9d42 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -543,7 +543,7 @@ Pass a positive integer as an argument to override a bot's default speed. if(mode != BOT_SUMMON && mode != BOT_RESPONDING) access_card.access = prev_access -/mob/living/simple_animal/bot/proc/call_bot(caller, turf/waypoint, message=TRUE) +/mob/living/simple_animal/bot/proc/call_bot(, turf/waypoint, message=TRUE) bot_reset() //Reset a bot before setting it to call mode. //For giving the bot temporary all-access. @@ -552,7 +552,7 @@ Pass a positive integer as an argument to override a bot's default speed. all_access.access = All.get_access() set_path(get_path_to(src, waypoint, 200, id=all_access)) - calling_ai = caller //Link the AI to the bot! + calling_ai = //Link the AI to the bot! ai_waypoint = waypoint if(path && path.len) //Ensures that a valid path is calculated! @@ -562,7 +562,7 @@ Pass a positive integer as an argument to override a bot's default speed. access_card = all_access //Give the bot all-access while under the AI's command. if(client) reset_access_timer_id = addtimer(CALLBACK (src, PROC_REF(bot_reset)), 600, TIMER_UNIQUE|TIMER_OVERRIDE|TIMER_STOPPABLE) //if the bot is player controlled, they get the extra access for a limited time - to_chat(src, "Priority waypoint set by [icon2html(calling_ai, src)] [caller]. Proceed to [end_area].
[path.len-1] meters to destination. You have been granted additional door access for 60 seconds.
") + to_chat(src, "Priority waypoint set by [icon2html(calling_ai, src)] []. Proceed to [end_area].
[path.len-1] meters to destination. You have been granted additional door access for 60 seconds.
") if(message) to_chat(calling_ai, "[icon2html(src, calling_ai)] [name] called to [end_area]. [path.len-1] meters to destination.") pathset = 1 diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm index c4a389cd2c..0168cd2cd0 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm @@ -421,7 +421,7 @@ add_ranged_ability(user, message, TRUE) return TRUE -/obj/effect/proc_holder/wrap/InterceptClickOn(mob/living/caller, params, atom/target) +/obj/effect/proc_holder/wrap/InterceptClickOn(mob/living/, params, atom/target) if(..()) return if(ranged_ability_user.incapacitated() || !istype(ranged_ability_user, /mob/living/simple_animal/hostile/poison/giant_spider/nurse)) diff --git a/code/modules/modular_computers/computers/item/computer.dm b/code/modules/modular_computers/computers/item/computer.dm index 267691be39..65734ef6bf 100644 --- a/code/modules/modular_computers/computers/item/computer.dm +++ b/code/modules/modular_computers/computers/item/computer.dm @@ -307,14 +307,14 @@ * The message that the program wishes to display. */ -/obj/item/modular_computer/proc/alert_call(datum/computer_file/program/caller, alerttext, sound = 'sound/machines/twobeep_high.ogg') - if(!caller || !caller.alert_able || caller.alert_silenced || !alerttext) //Yeah, we're checking alert_able. No, you don't get to make alerts that the user can't silence. +/obj/item/modular_computer/proc/alert_call(datum/computer_file/program/, alerttext, sound = 'sound/machines/twobeep_high.ogg') + if(! || !.alert_able || .alert_silenced || !alerttext) //Yeah, we're checking alert_able. No, you don't get to make alerts that the user can't silence. return playsound(src, sound, 50, TRUE) - visible_message(span_notice("The [src] displays a [caller.filedesc] notification: [alerttext]")) + visible_message(span_notice("The [src] displays a [.filedesc] notification: [alerttext]")) var/mob/living/holder = loc if(istype(holder)) - to_chat(holder, "[icon2html(src)] [span_notice("The [src] displays a [caller.filedesc] notification: [alerttext]")]") + to_chat(holder, "[icon2html(src)] [span_notice("The [src] displays a [.filedesc] notification: [alerttext]")]") // Function used by NanoUI's to obtain data for header. All relevant entries begin with "PC_" /obj/item/modular_computer/proc/get_header_data() diff --git a/code/modules/modular_computers/computers/item/processor.dm b/code/modules/modular_computers/computers/item/processor.dm index 0eaecc5aa2..def1b3414c 100644 --- a/code/modules/modular_computers/computers/item/processor.dm +++ b/code/modules/modular_computers/computers/item/processor.dm @@ -53,8 +53,8 @@ /obj/item/modular_computer/processor/attack_ghost(mob/user) ui_interact(user) -/obj/item/modular_computer/processor/alert_call(datum/computer_file/program/caller, alerttext) - if(!caller || !caller.alert_able || caller.alert_silenced || !alerttext) +/obj/item/modular_computer/processor/alert_call(datum/computer_file/program/, alerttext) + if(! || !.alert_able || .alert_silenced || !alerttext) return playsound(src, 'sound/machines/twobeep_high.ogg', 50, TRUE) - machinery_computer.visible_message(span_notice("The [src] displays a [caller.filedesc] notification: [alerttext]")) + machinery_computer.visible_message(span_notice("The [src] displays a [.filedesc] notification: [alerttext]")) diff --git a/code/modules/modular_computers/computers/item/tablet.dm b/code/modules/modular_computers/computers/item/tablet.dm index f495dadbf2..b67f59798c 100644 --- a/code/modules/modular_computers/computers/item/tablet.dm +++ b/code/modules/modular_computers/computers/item/tablet.dm @@ -225,11 +225,11 @@ borgo.toggle_headlamp(FALSE, TRUE) return TRUE -/obj/item/modular_computer/tablet/integrated/alert_call(datum/computer_file/program/caller, alerttext, sound = 'sound/machines/twobeep_high.ogg') - if(!caller || !caller.alert_able || caller.alert_silenced || !alerttext) //Yeah, we're checking alert_able. No, you don't get to make alerts that the user can't silence. +/obj/item/modular_computer/tablet/integrated/alert_call(datum/computer_file/program/, alerttext, sound = 'sound/machines/twobeep_high.ogg') + if(! || !.alert_able || .alert_silenced || !alerttext) //Yeah, we're checking alert_able. No, you don't get to make alerts that the user can't silence. return borgo.playsound_local(src, sound, 50, TRUE) - to_chat(borgo, span_notice("The [src] displays a [caller.filedesc] notification: [alerttext]")) + to_chat(borgo, span_notice("The [src] displays a [.filedesc] notification: [alerttext]")) /obj/item/modular_computer/tablet/integrated/syndicate diff --git a/code/modules/spells/spell.dm b/code/modules/spells/spell.dm index 28cb9ac36c..20ce88dc49 100644 --- a/code/modules/spells/spell.dm +++ b/code/modules/spells/spell.dm @@ -52,10 +52,10 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell)) //needed for th /obj/effect/proc_holder/proc/Trigger(mob/user) return TRUE -/obj/effect/proc_holder/proc/InterceptClickOn(mob/living/caller, params, atom/A) - if(caller.ranged_ability != src || ranged_ability_user != caller) //I'm not actually sure how these would trigger, but, uh, safety, I guess? - to_chat(caller, "[caller.ranged_ability.name] has been disabled.") - caller.ranged_ability.remove_ranged_ability() +/obj/effect/proc_holder/proc/InterceptClickOn(mob/living/, params, atom/A) + if(.ranged_ability != src || ranged_ability_user != ) //I'm not actually sure how these would trigger, but, uh, safety, I guess? + to_chat(, "[.ranged_ability.name] has been disabled.") + .ranged_ability.remove_ranged_ability() return TRUE //TRUE for failed, FALSE for passed. return FALSE diff --git a/code/modules/spells/spell_types/aimed.dm b/code/modules/spells/spell_types/aimed.dm index 9e68862ff4..d6f336d563 100644 --- a/code/modules/spells/spell_types/aimed.dm +++ b/code/modules/spells/spell_types/aimed.dm @@ -46,7 +46,7 @@ action.button_icon_state = "[base_icon_state][active]" action.UpdateButtons() -/obj/effect/proc_holder/spell/aimed/InterceptClickOn(mob/living/caller, params, atom/target) +/obj/effect/proc_holder/spell/aimed/InterceptClickOn(mob/living/, params, atom/target) if(..()) return FALSE var/ran_out = (current_amount <= 0) diff --git a/code/modules/spells/spell_types/pointed/pointed.dm b/code/modules/spells/spell_types/pointed/pointed.dm index f69cbfca70..7cbfbcff80 100644 --- a/code/modules/spells/spell_types/pointed/pointed.dm +++ b/code/modules/spells/spell_types/pointed/pointed.dm @@ -66,21 +66,21 @@ action.button_icon_state = "[action_icon_state]" action.UpdateButtons() -/obj/effect/proc_holder/spell/pointed/InterceptClickOn(mob/living/caller, params, atom/target) +/obj/effect/proc_holder/spell/pointed/InterceptClickOn(mob/living/, params, atom/target) if(..()) return TRUE if(aim_assist && isturf(target)) var/list/possible_targets = list() for(var/A in target) - if(intercept_check(caller, A, TRUE)) + if(intercept_check(, A, TRUE)) possible_targets += A if(possible_targets.len == 1) target = possible_targets[1] - if(!intercept_check(caller, target)) + if(!intercept_check(, target)) return TRUE - if(!cast_check(FALSE, caller)) + if(!cast_check(FALSE, )) return TRUE - perform(list(target), user = caller) + perform(list(target), user = ) remove_ranged_ability() return TRUE // Do not do any underlying actions after the spell cast diff --git a/code/modules/vore/trycatch.dm b/code/modules/vore/trycatch.dm index 8fcb9ee38d..3761e5b9c8 100644 --- a/code/modules/vore/trycatch.dm +++ b/code/modules/vore/trycatch.dm @@ -46,10 +46,10 @@ The hooks you're calling should return nonzero values on success. if(!hook_path) CRASH("hook_vr: Invalid hook '/hook/[hook]' called.") - var/caller = new hook_path + var/caller1 = new hook_path var/status = 1 for(var/P in typesof("[hook_path]/proc")) - if(!call(caller, P)(arglist(args))) + if(!call(caller1, P)(arglist(args))) stack_trace("hook_vr: Hook '[P]' failed or runtimed.") status = 0 diff --git a/tools/build/lib/byond.js b/tools/build/lib/byond.js index 952b60c4e9..f99e639763 100644 --- a/tools/build/lib/byond.js +++ b/tools/build/lib/byond.js @@ -60,7 +60,10 @@ const getDmPath = async () => { /** * @param {string} dmeFile - * @param {{ defines?: string[] }} options + * @param {{ + * defines?: string[]; + * warningsAsErrors?: boolean; + * }} options */ export const DreamMaker = async (dmeFile, options = {}) => { const dmPath = await getDmPath(); @@ -85,31 +88,59 @@ export const DreamMaker = async (dmeFile, options = {}) => { }; testOutputFile(`${dmeBaseName}.dmb`); testOutputFile(`${dmeBaseName}.rsc`); + const runWithWarningChecks = async (dmeFile, args) => { + const execReturn = await Juke.exec(dmeFile, args); + if (options.warningsAsErrors) { + const ignoredWarningCodes = options.ignoreWarningCodes ?? []; + if (ignoredWarningCodes.length > 0) { + Juke.logger.info( + "Ignored warning codes:", + ignoredWarningCodes.join(", ") + ); + } + const base_regex = "\\d+:warning( \\([a-z_]*\\))?:"; + const with_ignores = `\\d+:warning( \\([a-z_]*\\))?:(?!(${ignoredWarningCodes + .map((x) => `.*${x}.*$`) + .join("|")}))`; + const reg = + ignoredWarningCodes.length > 0 + ? new RegExp(with_ignores, "m") + : new RegExp(base_regex, "m"); + if (options.warningsAsErrors && execReturn.combined.match(reg)) { + Juke.logger.error(`Compile warnings treated as errors`); + throw new Juke.ExitCode(2); + } + } + return execReturn; + } // Compile const { defines } = options; if (defines && defines.length > 0) { - const injectedContent = defines - .map(x => `#define ${x}\n`) - .join(''); - fs.writeFileSync(`${dmeBaseName}.m.dme`, injectedContent); - const dmeContent = fs.readFileSync(`${dmeBaseName}.dme`); - fs.appendFileSync(`${dmeBaseName}.m.dme`, dmeContent); - await Juke.exec(dmPath, [`${dmeBaseName}.m.dme`]); - fs.writeFileSync(`${dmeBaseName}.dmb`, fs.readFileSync(`${dmeBaseName}.m.dmb`)); - fs.writeFileSync(`${dmeBaseName}.rsc`, fs.readFileSync(`${dmeBaseName}.m.rsc`)); - fs.unlinkSync(`${dmeBaseName}.m.dmb`); - fs.unlinkSync(`${dmeBaseName}.m.rsc`); - fs.unlinkSync(`${dmeBaseName}.m.dme`); + Juke.logger.info('Using defines:', defines.join(', ')); + try { + const injectedContent = defines + .map(x => `#define ${x}\n`) + .join(''); + fs.writeFileSync(`${dmeBaseName}.m.dme`, injectedContent); + const dmeContent = fs.readFileSync(`${dmeBaseName}.dme`); + fs.appendFileSync(`${dmeBaseName}.m.dme`, dmeContent); + await runWithWarningChecks(dmPath, [`${dmeBaseName}.m.dme`]); + fs.writeFileSync(`${dmeBaseName}.dmb`, fs.readFileSync(`${dmeBaseName}.m.dmb`)); + fs.writeFileSync(`${dmeBaseName}.rsc`, fs.readFileSync(`${dmeBaseName}.m.rsc`)); + } + finally { + Juke.rm(`${dmeBaseName}.m.*`); + } } else { - await Juke.exec(dmPath, [dmeFile]); + await runWithWarningChecks(dmPath, [dmeFile]); } }; export const DreamDaemon = async (dmbFile, ...args) => { const dmPath = await getDmPath(); const baseDir = path.dirname(dmPath); - const ddExeName = process.platform === 'win32' ? 'dd.exe' : 'DreamDaemon'; + const ddExeName = process.platform === 'win32' ? 'dreamdaemon.exe' : 'DreamDaemon'; const ddExePath = baseDir === '.' ? ddExeName : path.join(baseDir, ddExeName); return Juke.exec(ddExePath, [dmbFile, ...args]); };