mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 12:37:26 +01:00
Nukes reverse_direction() in favor of REVERSE_DIR define (#25550)
* same taste, twice the speed * pain
This commit is contained in:
@@ -248,7 +248,7 @@
|
||||
// - V - Attacker facing south
|
||||
// - - -
|
||||
// Victim at 135 or more degrees of where the victim is facing.
|
||||
if(attacker_dir & reverse_direction(attacker_to_victim))
|
||||
if(attacker_dir & REVERSE_DIR(attacker_to_victim))
|
||||
return DEVIATION_FULL
|
||||
// - - -
|
||||
// # V # Attacker facing south
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
|
||||
// On both tiles
|
||||
for(var/obj/structure/window/reinforced/mazeglass/W in T3)
|
||||
if(W.dir == reverse_direction(text2num(D)))
|
||||
if(W.dir == REVERSE_DIR(text2num(D)))
|
||||
qdel(W)
|
||||
|
||||
// Mark as visited
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
var/turf/T3 = unvisited_neighbours["[D]"] // Pick random dir turf
|
||||
|
||||
// Remove the color between the two
|
||||
var/turf/T4 = get_step(T3, reverse_direction(text2num(D)))
|
||||
var/turf/T4 = get_step(T3, REVERSE_DIR(text2num(D)))
|
||||
T4?.color = MAZEGEN_TURF_CELL
|
||||
|
||||
// Mark as visited
|
||||
|
||||
@@ -244,7 +244,7 @@
|
||||
/obj/item/mod/control/on_mob_move(direction, mob/user)
|
||||
if(!jetpack_active || !isturf(user.loc))
|
||||
return
|
||||
var/turf/T = get_step(src, reverse_direction(direction))
|
||||
var/turf/T = get_step(src, REVERSE_DIR(direction))
|
||||
if(!has_gravity(T))
|
||||
new /obj/effect/particle_effect/ion_trails(T, direction)
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
// if 2fast, throw the person, otherwise they just slide off, if there's reasonable speed at all
|
||||
if(speed && A.move_resist < INFINITY)
|
||||
var/dist = max(throw_dist * speed / MAX_SPEED, 1)
|
||||
A.throw_at(get_distant_turf(get_turf(src), reverse_direction(dir), dist), A.throw_range, A.throw_speed, src, 1)
|
||||
A.throw_at(get_distant_turf(get_turf(src), REVERSE_DIR(dir), dist), A.throw_range, A.throw_speed, src, 1)
|
||||
|
||||
/obj/machinery/power/treadmill/process()
|
||||
if(!anchored)
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
tempDir = EAST
|
||||
if(NORTHWEST, SOUTHWEST)
|
||||
tempDir = WEST
|
||||
var/turf/tempLoc = get_step(src, reverse_direction(tempDir))
|
||||
var/turf/tempLoc = get_step(src, REVERSE_DIR(tempDir))
|
||||
if(isspaceturf(tempLoc))
|
||||
to_chat(user, "<span class='warning'>You can't build a terminal on space.</span>")
|
||||
return
|
||||
|
||||
@@ -417,7 +417,7 @@
|
||||
playsound(human_owner, 'sound/goonstation/items/hypo.ogg', 80, TRUE)
|
||||
|
||||
var/obj/item/telegraph_vial = new /obj/item/qani_laaca_telegraph(get_turf(owner))
|
||||
var/turf/turf_we_throw_at = get_edge_target_turf(owner, reverse_direction(owner.dir))
|
||||
var/turf/turf_we_throw_at = get_edge_target_turf(owner, REVERSE_DIR(owner.dir))
|
||||
telegraph_vial.throw_at(turf_we_throw_at, 5, 1)
|
||||
|
||||
// Safety net in case the injection amount doesn't get reset. Apparently it happened to someone in a round.
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
if(!direction) // cable direction = 0, which means its a node
|
||||
return TRUE
|
||||
var/turf/potential_cable_turf = get_step(origin_turf, direction)
|
||||
var/reversed_direction = reverse_direction(direction)
|
||||
var/reversed_direction = REVERSE_DIR(direction)
|
||||
for(var/obj/structure/cable/other_cable in potential_cable_turf.contents)
|
||||
if(reversed_direction == other_cable.d1 || reversed_direction == other_cable.d2)
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user